in reply to croak not like die.

This is what I got:
perl -MCarp -le 'croak "Died here"' Died here at -e line 1
vs.
perl -MCarp -le 'croak "Died here\n"' Died here
from the perldoc:
The Carp routines are useful in your own modules because they act like die() or warn(), but with a message which is more likely to be useful to a user of your module.
soooo.... it's not the same, but like.
--------------
It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs

Replies are listed 'Best First'.
Re^2: croak not like die.
by holli (Abbot) on Mar 16, 2005 at 19:14 UTC
    I get
    Pig Pig Pig at C:\t.pl line 14 eval {...} called at C:\t.pl line 13 eval {...} called at C:\t.pl line 12 Pig at C:\t.pl line 14 eval {...} called at C:\t.pl line 13 eval {...} called at C:\t.pl line 12 at C:\t.pl line 16 eval {...} called at C:\t.pl line 12
    (ActivePerl 5.8.6)


    holli, /regexed monk/
Re^2: croak not like die.
by Joost (Canon) on Mar 16, 2005 at 22:53 UTC
    I get
    > perl -MCarp -le 'croak "Died here"' Died here at -e line 1 > perl -MCarp -le 'croak "Died here\n"' Died here at -e line 1

    Which is not the same as your ouput, but I would consider mine better, since the reason to use croak is to give the file/line message in the first place.

    This is perl, v5.8.6 built for i686-linux.
    (with -DDEBUGGING by the way, though I doubt that matters.)