in reply to Modifying value of $1 clobbers $2, $3 etc?
The scope of $<digit> extends to the end of the enclosing BLOCK or eval string, or to the next successful pattern match, whichever comes first.Line 7 of your script is a successful pattern match (a substitution is also a pattern match), so the $<digit> vars go out of scope
Update: removed inaccurate or even plain wrong stuff.
CU
Robartes-
|
|---|