in reply to Re^2: Using a regex to catch interpreters
in thread Using a regex to catch interpreters
it's that I'm under the impression that once you use $1 once, perl needs to track it for every regex in the entire program...
You're thinking of $&, $` and $'. They are always set by all regexps when they are used anywhere in the program.
$1 .. $9 are always set by every regexps that succeeds. When a given regexp has no corresponding capture, they are set to undefined. No attention is payed to whether $1 .. $9 are used anywhere.
|
|---|