while (my @fields = (getpwent)[6,7]) { map {print "$_\n"} @fields; print ("-" x 80); } #### while (my @fields = (getpwent)[6,7]) { foreach my $item (@list) { print "$_\n"; } print ("-" x 80); }