in reply to Is your module clobbering predefined variables?

Thats a fun bug and looking at how it's implemented and so forth, you'd think that it would be a far more common error. But some how it seems to almost never conflict, I've only run into it once or twice myself. Possibly because the only time i really use $_ is in things that automagically localize it, such as for map grep
  • Comment on Re: Is your module clobbering predefined variables?

Replies are listed 'Best First'.
Re: Is your module clobbering predefined variables?
by Abigail-II (Bishop) on Apr 14, 2003 at 07:35 UTC
    You mean, you've never used
    while (<>) { ... }

    Because that's the most common construct that sets $_ without localizing it.

    Abigail

        Shouldn't it be in the language - that the $_ variable is by default localized to module? It's hardly usefull to maintain the topic across multiple modules. Anybody knows how it is to be in Perl 6?