in reply to search position is getting reset after 'local'
A "local" just gives temporary values to global (meaning package) variables. It does not create a local variable.I read that as meaning it works like this:
print "$x, ", pos($x), "\n"; { $tmp_1 = $x; $x = undef; $x = $tmp_1; # assign "old" value to $x, losing the pos() informat +ion. } print "$x, ", pos($x), "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: search position is getting reset after 'local'
by dave_the_m (Monsignor) on Jun 12, 2006 at 12:51 UTC | |
by Joost (Canon) on Jun 12, 2006 at 13:10 UTC | |
by dave_the_m (Monsignor) on Jun 12, 2006 at 13:35 UTC |