while(@fnames) { my $f = shift @fnames; next if(-l $f); for my $f2 (@fnames) { next if(-l $f2);