in reply to Capturing parentheses out of scope
You could assign them (i.e. $1..$N) to an array declared in the outer scope — or in the if-scope: if (my @f = /...
But what would you expect them to hold if the regex doesn't match? Or is it only the second test (and ( !/numsnp=[1-4]\s+/ )) that is expected to fail in these cases?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Capturing parentheses out of scope
by iangibson (Scribe) on Jan 20, 2011 at 21:10 UTC |