my $dirname = 'foo'; my @non_symlinks = grep { not -l } <$dirname/*>;