Mailinglist Archive: opensuse (3666 mails)

< Previous Next >
Re: [SLE] How can I debug a PERL program ?
  • From: Maura Edelweiss Monville <memonvil@xxxxxxxxxxxxxxxx>
  • Date: Sat, 12 Mar 2005 14:55:00 -0500
  • Message-id: <42334914.8020407@xxxxxxxxxxxxxxxx>
Robert A. Rawlinson wrote:

Randall R Schulz wrote:


On Saturday 12 March 2005 10:19, Maura Edelweiss Monville wrote:

I'm trying to mofify a small PERL program that was written for me.
Since I have no previous experience of using this language I wonder
how I can
debug it.
PERL seems to be aninterpreter more than a debugger ...

I'm not an expert in Perl any more, but a Google search on "Perl Debuggin" gives some good hits. There are tutorials and tools, including at GUI debuggers for Perl.

Have you looked at any of the resources listed there?

thanks a lot,

Randall Schulz

Perl is an interpreter but just before it runs the program it compiles it. If you start the program "perl -d"
it will start the debuger for you. When debuger starts type "h" and it will give you help.
Bob Rawlinson

I tried to activate the debugger . As a result it started to print out error-messages on the screen .. I had to kill the process that had gone out of control.

Other question: HOW can I tell PERL to sckip the initial blanks (spaces) ?
I'm extracting some fields from a huge ascii file. all records start with 1 space preceding the fisrt numerical value.
Fileds are separated by spaces. This situation seems to confuse the PERL buil-in function split. In fact the extracted fileds are messed up .. misaligned. But if I get rid of the head space (blank character) for any record in the file in advance of starting my PERL program .. then it works !
I just wonder if I can avoid this file pre-processing and do everything by PERL ...

Thank you very much,

< Previous Next >