![]() |
|
XP is just a number | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
The behaviour you are seeing is caused by the fact that $1 and friends are only overwritten by a successfull match or substitution that has backreferences. So your code says check this expressions against $1, if that matched then and only then will $1, $2 & $3 be given the new values. If it didn't match, then there is no statement to overwrite $1, so your that your else clause is checking the same value of $1. Nuance
In reply to RE: Scope of regular expression variables
by nuance
|
|