in reply to Is there any module to strip error filename ?

Just don't print it in the first place. Compare

>perl -e"die qq{foo}" foo at -e line 1. >perl -e"die qq{foo\n}" foo

See die.

Replies are listed 'Best First'.
Re^2: Is there any module to strip error filename ?
by Anonymous Monk on Oct 20, 2008 at 19:23 UTC
    Thanks. This is for the script. Actually, in some of the model classes also i need. Like it's a huge application, whenever i used croak i am getting the line number and i want to avoid ?

      That's the point of Carp::croak. If you don't want that, use die.