http://www.perlmonks.org?node_id=96437


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:
sub next_foo { while (<>) { return $. if /^FOO:/ } } while (next_foo) { do_something # with $_ }
Some people won't like this style. That's fine, you don't have to. Other will like it, and Perl let's you.

-- Abigail