We don't bite newbies here... much | |
PerlMonks |
Re^2: search position is getting reset after 'local'by ikegami (Patriarch) |
on Jun 12, 2006 at 15:22 UTC ( [id://554830]=note: print w/replies, xml ) | Need Help?? |
Re your update, here's a version that doesn't use use vars:
I think you meant, "another reason to avoid using package variables". By the way, I don't see how you got it to work with strict on. It doesn't work if you keep $x as a package variable, and local $x doesn't work if you changed $x into a lexical (i.e. used my $x).
In Section
Seekers of Perl Wisdom
|
|