On Wed, 10 Jan 2007 07:37:24 -0500, Muttley Meen wrote: > I have the code: > > $SIG{__WARN__} = sub { print $_[0]; } ; > > I'm expecting that when i use > warn "WARN"; only "WARN" will be printed to STDERR, no other text. > but perl is smart to tell me the file and the line, even though I did > not requested > that: > WARN at ./1.pl line 4.
perldoc -f die (perldoc -f warn should probably be clearer on this.) > Is there a way not to print the file and the line ? $SIG{__WARN__} = sub { my $msg = shift; chomp $msg; print "$msg\n"; } ; -- 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/