:Hi all!
:
:I'm looking for a way to add to an error subroutine the ability
:to print the line number that an error occured at. For example,
:if I run an external program like `prog`, and then check the
:return code variable $?, I'd like to exit if there was an
:error and also print to a log file the line number of the Perl
:script where the error occured. The script we use have quite a
:number of external program calls, and we'd like to know where it
:blows up.
:
:Any suggestions would be appreciated, and thanks in advance.
look at the docs on
__LINE__
__FILE__
caller
die
warn
(In the Carp module) carp, croak, confess
--tom
--
"That's okay. Anyone whose opinion he cares about already knows that
he doesn't care about their opinion."
--Larry Wall