On Wed, 10 Jan 2007 08:32:26 -0500, Muttley Meen wrote:
> On 1/10/07, Peter Scott <[EMAIL PROTECTED]> wrote:
>> On Wed, 10 Jan 2007 07:37:24 -0500, Muttley Meen wrote:
>> > I have the code:
>> > $SIG{__WARN__} = sub { print $_[0]; } ;
>>
>> perldoc -f die
>>
>> (perldoc -f warn should probably be clearer on this.)
>>
> Already did that :)

Which one?  perldoc -f die explains what you are seeing.  I already
submitted a patch for perldoc -f warn to make it clearer that you need to
look there.

>> $SIG{__WARN__} = sub { my $msg = shift; chomp $msg; print "$msg\n"; } ;
> 
> How is this different from what I wrote above ?

Uh, never mind.  I shouldn't post so early in the morning.  You want
something more like this:

$SIG{__WARN__} = sub { my $msg = shift; 
                       $msg =~ s/ at \Q$0\E .*?\.\Z//;
                       print $msg; };

-- 
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/


Reply via email to