#!/usr/bin/perl -w use File::Spec::Functions qw(catfile); use strict; my @users = qw(/home/zentara); foreach $homedir (@users) { my $dh; opendir $dh, $homedir or warn "Cannot readdir $homedir:$!\n"; my @files = grep /\A[^.]/ and -f catfile($homedir, $_), readdir DIR; print "@files\n" . "#"x47 ." \n"; } exit;