Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: Short and easy way to write if...elsif syntax

by Anonymous Monk
on Aug 28, 2012 at 00:28 UTC ( #990100=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Short and easy way to write if...elsif syntax
in thread Short and easy way to write if...elsif syntax

Given/When is syntactic sugar for if..elsif.


Comment on Re^4: Short and easy way to write if...elsif syntax
Replies are listed 'Best First'.
Re^5: Short and easy way to write if...elsif syntax
by Kenosis (Priest) on Aug 28, 2012 at 02:08 UTC

    Perhaps I'm misunderstanding what you're saying, but given is a topicalizer, aliasing a lexically scoped $_ to a scalar's value which when operates on. The if/elsif construct doesn't create topics. Given this difference in functionality, how is given/when syntactic sugar for if/elsif?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (19)
As of 2015-07-30 21:11 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 (273 votes), past polls