Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Smart enough for Smart Match??? (was "Understanding ...Given/When" )

by LanX (Saint)
on Mar 04, 2010 at 15:53 UTC ( [id://826728]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     Most of the power comes from implicit smart matching:
     
        when($foo)
    ...
    is exactly equivalent to
     
        when($_ ~~ $foo)
    
  2. or download this
    #  $a $b Type of Match Implied Matching Code
    # ====== ===== ===================== =============
    ...
    #  Array Regex array grep grep /$b/, @$a
    
  3. or download this
     given (@a) {
        when (/abc/) {}
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-18 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found