in reply to Re: Re: When is $_ local and when is it not?
in thread When is $_ local and when is it not?
Yes, I think it should work that way. Then you can write code like:
Some people won't like this style. That's fine, you don't have to. Other will like it, and Perl let's you.sub next_foo { while (<>) { return $. if /^FOO:/ } } while (next_foo) { do_something # with $_ }
-- Abigail
In Section
Seekers of Perl Wisdom