[ create a new paste ] login | about

Link: http://codepad.org/WOQWOzQN    [ raw code | output | fork ]

Perl, pasted on May 10:
1
2
3
4
5
6
7
8
9
10
my $what_happened;
eval{
    local $SIG{__DIE__} = sub {
        $what_happened = shift;
    };
    die "I am not dead yet";
    print "I will not be executed";
};
print STDERR qq(what_happend = '$what_happened'\n);
die "normally";


Output:
1
2
3
what_happend = 'I am not dead yet at line 6.
'
normally at line 10.


Create a new paste based on this one


Comments: