in reply to Re: Reading in Text File and skipping lines
in thread Reading in Text File and skipping lines

This is a great example of why i discourage the use of $_ and other implicit variables. It perpetuates misunderstanding of what is really going on. Do others feel that this shorthand leads to confusion, or am i too anal?
I like to go one step further in reading files:
while( my $line = <TEMPLATE> ) { $outputpage .= $line; }
or even
my @lines = <TEMPLATE>; foreach my $line (@lines) { $outputpage .= $line; }

Replies are listed 'Best First'.
Re: Re: Re: Reading in Text File and skipping lines
by graff (Chancellor) on Nov 08, 2002 at 04:16 UTC
    Do others feel that this shorthand leads to confusion, or ...

    It's only confusing until you get it. =) After that, it leads to simplification and reduced clutter in scripts.