in reply to Should we Localize $_ ?
Besides, I like to explicitly define what the item is that I'm dealing with. I find it much more sane to say, for example:
than just implicitly sayingfor my $isbn ( @isbns ) { dosomething($isbn);
Besides, in the latter case, you have to ask yourself a question: "Where is the $_ coming from, and what is it?" It should be every programmer's job to eliminate any such potential questions from the minds of future maintainers, even if it's herself.for ( @isbns ) { dosomething($_);
Can you tell I'm working on my departmental coding standards? :-)
xoxo,
Andy
%_=split/;/,".;;n;u;e;ot;t;her;c; ". # Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'. # http://petdance.com
"hack";print map delete$_{$_},split//,q< andy@petdance.com >
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: Should we Localize $_ ?
by tilly (Archbishop) on Jun 14, 2001 at 04:42 UTC | |
|
Re: Re: Should we Localize $_ ?
by frag (Hermit) on Jun 14, 2001 at 01:30 UTC | |
|
Re: Re: Should we Localize $_ ?
by mikeB (Friar) on Jun 13, 2001 at 23:26 UTC | |
|
Re: Re: Should we Localize $_ ?
by Anonymous Monk on Jun 14, 2001 at 18:34 UTC |