Why doesn't $1 reset when the regexp doesn't match anything?
It's a feature, not a bug :-)
Actually there are times when it comes in handy, if I'm doing stuff where I need it to be redefined I usually use an if {} elsif{} else{} loop. That way it only goes into the {} if the if (or elsif) matches. If you don't want to use an elsif (because you are checking a few things) just use multiple if statements.
In reply to Re: $1 don't reset (non loop)
by MCS
in thread $1 don't reset (non loop)
by jockel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |