develooper Front page | perl.beginners | Postings from February 2002

die handler

From:
Pradeep Sethi
Date:
February 27, 2002 14:48
Subject:
die handler
Message ID:
F15nUYn83KsIno0NM2n0000b3a3@hotmail.com
Hi ,

I have this in my code :

local $SIG{__DIE__} = \&die_handler;

and then

sub die_handler {

my (@vars)=@_;

print STDERR "\nfirst : " . $vars[0];

print STDERR "\nsecond : " . $vars[1];

}

if i give :

die ('goo','foo','bar');

Then I get the output :

first : goofoobar at out.pl line 233.

second :

I want to have the three arguments in an array.

can somebody tell what am I doing wrong ?

Thanks

Pradeep



_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About