That said I would write your example as:
(print is quite happy taking a list...)while (my @fields = (getpwent)[6,7]) { print map "$_\n", @fields, ("-" x 80); }
In reply to Re (tilly) 1: map vs. foreach
by tilly
in thread map vs. foreach
by rchiav
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |