I first wanted to write:
but then wrote insteadwhile(<>) { chomp; push(@{$para{$_}}, $ARGV); }
because it's shorter.chomp,push(@{$para{$_}}, $ARGV) for (<>);
Unfortunately both versions are not equivalent. $ARGV is always the $ARGV[$#ARGV] in the for loop, while it changes to the current filename in the first loop.
Is this a documented feature?
In reply to while or for? by Skeeve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |