On Tue, Aug 28, 2001 at 02:42:58PM -0400, John Way wrote:
> Does anyone know how to get a perl script to write out each line of code to
> an output (log) file as it performs each line? (Other than a print
> statement after everyline) I've looked in the perlrun documentation, but
> could not find anything.

I do not know of such a feature.  The Perl debugger gets close, but it's
interactive; perhaps you could get it to log to a file, I don't know.

 
> My objective is to get a file that can be checked in case of an error to
> see where the program blew up.
> Is there a better way to do accomplish this?
> I am trying to emulate the "set verify" command from VMS DCL

Perl does a run beforehand to compile the code to bytecode, and aborts if
any syntax errors are found; errors are printed with an accompanying line
number.  Any warning messages printed by perl itself include a line number. 
If an operation you're doing fails (say, an open call) you should print some
unique message to indicate what went wrong, with what data, that way you can
search back through the code to find the error message.  Other than that,
you can step through code line by line with the perl debugger (perldoc
perldebug).

I guess I'm not understanding why you need specifically this.  What kinds of
operations can blow up so drastically, without any trace of what operation
it is, or where it is?  What did this VMS DCL 'set verify' command do?  What
was it used for?


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to