Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: (tye)Re: GOTO considered (a necessary) evil?

by Anonymous Monk
on Jul 15, 2002 at 19:40 UTC ( #181890=note: print w/ replies, xml ) Need Help??


in reply to (tye)Re: GOTO considered (a necessary) evil?
in thread GOTO considered (a necessary) evil?

there are cases where $@ can give the wrong impression about whether the eval was successful.

Can you give an example of that?


Comment on Re: (tye)Re: GOTO considered (a necessary) evil?
Replies are listed 'Best First'.
Re: example: eval fails but $@ ends up empty (was: GOTO...)
by tye (Cardinal) on Jul 15, 2002 at 22:17 UTC

    Sure:

    sub DESTROY { eval "1" } eval 'my $x = bless {}; die "ouch\n"'; print "($@)\n";
    which prints "()" not "(ouch\n)".

            - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2015-07-31 08:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (275 votes), past polls