in reply to map vs. foreach
That said I would write your example as:
while (my @fields = (getpwent)[6,7]) { print map "$_\n", @fields, ("-" x 80); } [download]