Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: "Obviously, You Will Need a Java Course..."

by darobin (Monk)
on Apr 04, 2001 at 15:27 UTC ( #69620=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://69620]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2023-01-30 07:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?