in reply to Re: Remove the location of error from error messages from croak
in thread Remove the location of error from error messages from croak

eval{ die 1; }; warn $@; $SIG{__DIE__} = sub{ my( $err ) = @_; $err=~ s/ at .*? line \d+.$/\n/; die $err; }; die 2; __END__ 1 at - line 1. 2

Replies are listed 'Best First'.
Re^3: Remove the location of error from error messages from croak
by LanX (Saint) on Jul 01, 2014 at 17:28 UTC
    let's hope no filename will ever contain the substring " at " ! ;-)

    Cheers Rolf

    (addicted to the Perl Programming Language)

      spaces in filenames is hangable offense :)