in reply to Re: file with a blank in its name
in thread file with a blank in its name

If you're retrieving all filenames using opendir and readdir (which is the way I usually do it), then you'll want to filter out at least directories (and possibly smylinks as well)
Here's one way to do it (modified from example in The Perl Cookbook):
$dir = 'path/to/directory'; opendir(DIR, $dir) or dir "Can't open $dir: $!"; while (defined($file = readdir DIR)) { #Test if $file is a directory unless (-d "$dir/$file") { #Test if $file is a symlink unless (-l "$dir/$file") { #push $file onto @list push(@list,$file); } } }