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