Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Drawback of eval {---}if ($@){---}, when using many times?

by GotToBTru (Prior)
on Oct 29, 2015 at 12:25 UTC ( [id://1146370]=note: print w/replies, xml ) Need Help??


in reply to Drawback of eval {---}if ($@){---}, when using many times?

It looks clunky, I am not sure if there is anything wrong with it. The danger with eval is if you have variable interpolations that may allow uncontrolled code to be run.

If the blocks in the eval look similar then you might want to replace them with a subroutine call.

Dum Spiro Spero

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-03-28 17:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found