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?
In reply to Re: Capturing parentheses out of scope
by Anonyrnous Monk
in thread Capturing parentheses out of scope
by iangibson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |