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

die handler : posting again.

Thread Next
From:
Sethi, Pradeep
Date:
March 1, 2002 11:49
Subject:
die handler : posting again.
Message ID:
2BE9E62E20307E4187358C5B3887B7340E7DD3@sjc-exm-20.corp.ebay.com
I posted it earlier also but got no response. Posting again to 
hope to get some advice.

thanks in again

-----Original Message-----

Sent: Wednesday, February 27, 2002 2:46 PM
To: beginners@perl.org
Subject: die handler


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


-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org

Thread Next


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