Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: for ($@)

by edoc (Chaplain)
on Jan 19, 2005 at 00:48 UTC ( #423231=note: print w/replies, xml ) Need Help??


in reply to for ($@)

FWIW..

This looks to me like a first revision which was intended to be developed further. As mentioned by hardburn the for ($@) sets $_ to the value of $@. Why would we want to do that? So we could then do something like:

eval { # bla bla }; for ($@) { /NOT FOUND/ && do { print 'Where'd I put that?'; last; }; print 'Na,ah. Not for you!' if /FORBIDDEN/; }

Each of those is testing the string value of $@

cheers,

J

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2022-01-17 10:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (51 votes). Check out past polls.

    Notices?