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

Re (tilly) 3: Apocalypse 4 on perl.com

by tilly (Archbishop)
on Jan 22, 2002 at 04:58 UTC ( [id://140554]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Apocalypse 4 on perl.com
in thread Apocalypse 4 on perl.com

How about nothing?
given ($foo) { when (1) {print "One";}; when (2) {print "Two";}; print "Didn't fit any case we know about"; }
Indent to taste.

UPDATE
I don't think that "normal code" will often see a difference. While I can dream up situations where I think it matters, in all of them you are doing evil, awful things that you probably shouldn't. (Like using a default to shortcircuit out of a function.)

Replies are listed 'Best First'.
(tye)Re: Apocalypse 4 on perl.com
by tye (Sage) on Jan 22, 2002 at 05:15 UTC

    That is already defined to work but doesn't solve the problem of the presense of a real "default" block changing the handling of exceptions.

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-25 06:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found