in reply to Re: Trouble opening files from a directory: "no such file".
in thread Trouble opening files from a directory: "no such file".

Using the normal glob function directly fails if $dir contains directories with whitespace in them. It's better to use the bsd_glob function of File::Glob, or alternatively, to appropriately quote the whitespace in the arguments to glob.