note
webfiend
<p>Hold up. How does one variable - two, if you did what I do and use a variable for the outer read as well - equate to clutter? I'd probably remove the unused <code>$cnt</code> if I was going to knock clutter out.</p>
<code>
use Modern::Perl;
while (my $line = <DATA>) {
if ( $. % 10 == 1 ) {
print $line;
}
for (0 .. 3) {
my $important_line = <DATA>;
print $important_line;
}
}
</code>
<p>I realize this is a matter of personal aesthetics, of course. I was just a little confused how declaring and using a variable (and avoiding weird behavior from <code><DATA></code>) was better than declaring an unused variable and getting the weird behavior.
748833
748843