$_ and @_ are there for a reason.
while (<>) {
next if /comment/;
s/foo/bar/;
print;
} |
foreach loop to give
$_ a value but in the loop you don't use any operator that has
$_ as its default argument. If you're going to say $_ everywhere,
you might as well use a meaningful variable name.| Forward to More like C++ or Java
Back to A Perl Initiate... Up to Stages of a Perl Programmer section index Up to YAPC 2000 course index |
YAPC 2000: Stages of a Perl Programmer - 12
Copyright © 2000, Nathan Torkington
|