uva has asked for the wisdom of the Perl Monks concerning the following question:
hello monks,,
..... can you please explain the code. is $SIG should us with "_DIE_"? when ever die is used, it automatically invokes _DIE_,is it true? i read perl is using top down approach, i debugged the above program , the execution goes up to eval and jumps to $SIG line.how it is possible?explain me please.local $SIG{'__DIE__'} = sub { (my $x = $_[0]) =~ s/foo/bar/g; die $x }; eval { die "foo lives here" };
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: help in $SIG
by sk (Curate) on Feb 09, 2006 at 06:32 UTC | |
by uva (Sexton) on Feb 09, 2006 at 06:47 UTC | |
by sk (Curate) on Feb 09, 2006 at 06:54 UTC |
Back to
Seekers of Perl Wisdom