Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Perl 5.10: switch statement demo

by jdporter (Chancellor)
on Dec 19, 2007 at 20:26 UTC ( [id://657968]=note: print w/replies, xml ) Need Help??


in reply to Perl 5.10: switch statement demo

That doesn't look like a particularly apt illustration of given/when anyway, since it completely circumvents given's smart matching. It certainly doesn't look any better than

$_ % 3 or push @what, 'fizz'; $_ % 5 or push @what, 'buzz'; $_ % 7 or push @what, 'sausage';
which, as you pointed out, DWYM in this case, while given/when doesn't.

A word spoken in Mind will reach its own level, in the objective world, by its own weight

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-03-19 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found