my @array = qw(blue red orange brown); # No commas in qw() foreach (@array) { print("$_\n"); }
See perlsyn.
<...> is used when reading from a file handle. It can also be used for globbing (as you are using it), but that's very fragile.
Update: Just noticed the commas in qw(). Addressed this.
In reply to Re: process array with while loop
by ikegami
in thread process array with while loop
by reason2006
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |