http://qs1969.pair.com?node_id=69620


in reply to "Obviously, You Will Need a Java Course..."

Actually, open(FH,"myFile.txt") or die "Nope : $!\n"; isn't really equivalent to the try-catch part above. A closer moral equivalent would be:

eval { open FH, '<my_file' or die $!; }; print $@ if $@;

...or of course a number of other possible Perl constructs around the same idea.

-- darobin