in reply to Re: open or die..
in thread open or die..

Yes, an exception is raised, but why doesn't it print the message that is given as a param to the die built-in? I would expect that.

For example:

$ perl -e 'open my $FOO, "<", "foo2.txt" or die "Could not open file + foo2.txt : $!";' Could not open file foo2.txt : No such file or directory at -e line 1.

Je suis Charlie.

Replies are listed 'Best First'.
Re^3: open or die..
by Corion (Patriarch) on Feb 15, 2015 at 11:58 UTC

    I completely missed that the error message as caught was not the error message as (should have been) raised.