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

Re^2: Double interpolation of captured substrings

by Fletch (Chancellor)
on Nov 17, 2004 at 16:59 UTC ( #408474=note: print w/ replies, xml ) Need Help??


in reply to Re: Double interpolation of captured substrings
in thread Double interpolation of captured substrings

You could also allow for referencing the whole match as 0 with:

$str =~ $regex; my @matches = map substr( $str, $-[$_], $+[$_] - $-[$_] ), 0..$#-;


Comment on Re^2: Double interpolation of captured substrings
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-12-25 11:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls