Why do people do the clunky readdir dance when glob() or <*> would do just as nicely in far less space and trouble? In this case, it's even worse, since readdir lists "hidden" files but globbing doesn't.
my $dirname = 'foo';
my @non_symlinks =
grep { not -l }
<$dirname/*>;