in reply to What Is Going On Here ?????
foreach my $element ( @array ) {
print "\"$element\"\n";
do_something($element);
}
An explicit loop variable helps express the code's intention, which helps when some poor fool has to pick up the code six months later.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: What Is Going On Here ?????
by orthanc (Monk) on Nov 22, 2000 at 14:25 UTC |