Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: Small examples of string eval

by eyepopslikeamosquito (Chancellor)
on May 14, 2006 at 03:43 UTC ( #549288=note: print w/ replies, xml ) Need Help??

in reply to Re: Small examples of string eval
in thread Small examples of string eval

eval { @result = $dbh->selectrow_array($query) }; return my_custom_error_handler("selectrow_array $query") if $@;
That is an example of block eval, not string eval; the OP was asking about string eval. There is wide agreement that block eval is a good thing in Perl 5 (for exception handling). Overloading eval with two different meanings in Perl 5 was unfortunate and is fixed in Perl 6, where block eval is spelled try.

Comment on Re^2: Small examples of string eval
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2015-11-25 03:22 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (670 votes), past polls