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

Re^2: Capturing regex from map

by LanX (Sage)
on Sep 13, 2013 at 17:14 UTC ( #1053971=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      DB<217> map { /(1\d*)/;$1 } 5..15
     => (undef, undef, undef, undef, undef, 10, 11, 12, 13, 14, 15)
    
      DB<218> map { /(1\d*)/ } 5..15
     => (10, 11, 12, 13, 14, 15)
    
  2. or download this
      DB<225> map { @matches=/(1\d*)/;@matches} 5..15
     => (10, 11, 12, 13, 14, 15)
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2022-12-07 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?