On Fri, 20 May 2005 14:37:35 +0530, Ankur Gupta wrote: >> Hello beginners@perl.org, >> >> it is possible to setup somewhere, I want my script dies, if >> warning occurs. > > BEGIN { > $SIG{__WARN__} = sub{ print STDERR @_; exit 1}; > } > > warn "I am going to die\n";
The more modern (last 5 years) way is: use warnings FATAL => 'all'; -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>