Re: How to get the script line number on demand
John W. Krahn [EMAIL PROTECTED] writes: print 'Program name: ', __FILE__, \n; print 'Current script line: ', __LINE__, \n; print 'Current package: ', __PACKAGE__, \n; Thanks.. I'd seen those first too in a few places but blithely zipped over them not realizing what they were. Thanks... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get the script line number on demand
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]