How to print each line as a perl script executes?

P

Peng Yu

Is there a way to print the corresponding line in the perl script as
the script executes?
 
U

Uri Guttman

JE> Interestingly enough "perldoc debug" launches the same man page.

perldoc debug
No documentation found for "debug".

uri
 
J

Jürgen Exner

Uri Guttman said:
JE> Interestingly enough "perldoc debug" launches the same man page.

perldoc debug
No documentation found for "debug".

Hmmmmm, as I said, works just fine here:

C:\Users\jue>perldoc debug
NAME
perldebug - Perl debugging
[....]

C:\Users\jue>perl -v
This is perl, v5.10.1 built for MSWin32-x64-multi-thread
(with 2 registered patches, see perl -V for more detail)

Copyright 1987-2009, Larry Wall

Binary build 1006 [291086] provided by ActiveState
http://www.ActiveState.com
Built Aug 24 2009 13:45:20

jue
 
J

John Bokma

Jürgen Exner said:
Uri Guttman said:
JE> Interestingly enough "perldoc debug" launches the same man page.

perldoc debug
No documentation found for "debug".

Hmmmmm, as I said, works just fine here:

C:\Users\jue>perldoc debug
NAME
perldebug - Perl debugging
[....]



C:\Documents and Settings\John>perldoc debug
NAME
perldebug - Perl debugging

DESCRIPTION
First of all, have you tried using the -w switch?
:

C:\Documents and Settings\John>perl -v

This is perl, v5.10.1 built for MSWin32-x86-multi-thread
(with 2 registered patches, see perl -V for more detail)

Copyright 1987-2009, Larry Wall

Binary build 1006 [291086] provided by ActiveState http://www.ActiveState.com
Built Aug 24 2009 13:48:26
:

Windows XP + SP3

However, on Ubuntu 8.10:

No documentation found for "debug".


perl -v

This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi


So, "blame" ActiveState I guess?
 
C

C.DeRykus

  >>
  >> Quoth J?Exner <[email protected]>:
  >>> >Is there a way to print the corresponding line in the perl script as
  >>> >the script executes?
  >>>
  >>> perldoc debug
  >>
  >> ITYM perldoc perldebug.

  JE> Interestingly enough "perldoc debug" launches the same man page.

perldoc debug
No documentation found for "debug".

I notice both Strawberry and ActiveState 5.10.1 perldoc's
(v3.15) -- I don't have a 5.10.1 Unix system handy --
apparently apply FWIM (find what I mean) and prepend
'perl' during the search:


c:\strawberry\perl\lib\pods>perldoc -D debug
....
Searching for debug
Looking for debug in C:\Perl\bin C:/Perl/site/lib C:/Perl/lib . C:\Perl
\site\bin ...
Looking for perldebug in C:\Perl\bin C:/Perl/site/lib C:/Perl/lib .
Loosely found as C:\Perl\lib\pods\perldebug.pod
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top