Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: converting from switch to given-when

by Athanasius (Abbot)
on Sep 26, 2012 at 08:07 UTC ( #995728=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    The smartmatch implicitly dereferences any non-blessed hash or array r
    +eference, so the HASH and ARRAY entries apply in those cases.
    
  2. or download this
    Right operand is an ARRAY:
    
    ...
    
    Any       ARRAY      smartmatch each ARRAY element
                   like: grep { Any ~~ $_ } ARRAY
    
  3. or download this
    Num       nummy       numeric equality
                    like: Num == nummy
    
  4. or download this
    Either an actual number, or a string that looks like one.
    
  5. or download this
    grep { $selection ~~ $_ } (5103)
    
  6. or download this
    $selection == 5103
    
  7. or download this
    use constant FOO => 42;
    
  8. or download this
    sub FOO() { return 42; }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2015-07-07 06:20 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 (87 votes), past polls