Harry Putnam wrote: > > How does one print the line number of the script as it executes. > > Something like what the PS4 shell var does if you set it to: > > PS4='$LINENO' > Then when running a shell script with -x flag you see script line > numbers as it runs. > > I'd like to stick these into code at times to help debug > > print "mydbg $VarThatHoldsCurrentScriptLineNo\n";
print 'Program name: ', __FILE__, "\n"; print 'Current script line: ', __LINE__, "\n"; print 'Current package: ', __PACKAGE__, "\n"; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]