Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Variable matching on a regex

by eric256 (Parson)
on Jun 17, 2010 at 15:00 UTC ( [id://845221] : note . print w/replies, xml ) Need Help??


in reply to Re^2: Variable matching on a regex
in thread Variable matching on a regex

Looks like minor typo at the start of the regex, but it works!

$data =~ /(?:(\d+)\s*(?{push @results, $^N}))+$/;

___________
Eric Hodges