No, you don't.
But loop variables should be declared in the loop construct:
or (means the same)foreach my $item (@list) { }
for my $item (@list) { }
In reply to Re^3: Compare and copy array values
by Narveson
in thread Compare and copy array values
by tgolf4fun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |