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 ... thanks a lot, MEM
Maura, 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, MEM
Randall Schulz
Randall R Schulz wrote:
Maura,
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, MEM
Randall Schulz
Perl is an interpreter but just before it runs the program it compiles it. If you start the program "perl -d programname.pl" it will start the debuger for you. When debuger starts type "h" and it will give you help. Bob Rawlinson
Robert A. Rawlinson wrote:
Randall R Schulz wrote:
Maura,
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, MEM
Randall Schulz
Perl is an interpreter but just before it runs the program it compiles it. If you start the program "perl -d programname.pl" 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, Maura
Maura Edelweiss Monville wrote:
I just wonder if I can avoid this file pre-processing and do everything by PERL ...
Certainly. There are almost no limits do what perl will do for you. But why choose perl if you don't know it? Even so, it doesn't sound very much like a suse-specific problem - maybe there are other mailing-lists better suited for asking this kind of question? /Per Jessen, Zürich -- http://www.spamchek.com/freetrial - sign up for your free 30-day trial now!
Maura Edelweiss Monville wrote:
Perl is an interpreter but just before it runs the program it compiles it. If you start the program "perl -d programname.pl" 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, Maura
It was probably printing error messages about the perl program. You may have to clear those up before the program will run. You could look up the "trim" function in perl. You should be able to read the documnet of perl by typeing perldoc. Start with perdoc perl. I lists the other help files and will give you some of the basics. Bob Rawlinson
On Saturday 12 March 2005 19:55, Maura Edelweiss Monville wrote:
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 ...
Try this (asciitest looks like this
" field1 field2 field3 field4 field5 field6 field7 field8 field9");
#!/usr/bin/perl -w
#
open "TEXT", "
participants (5)
-
Allister
-
Maura Edelweiss Monville
-
Per Jessen
-
Randall R Schulz
-
Robert A. Rawlinson