in reply to How do you open a filehandle to a DOS file which has spaces in the filename?

Just quote it and everything will be fine:
open (SPACEY, "this file has spaces.txt") || die;
  • Comment on Re: How do you open a filehandle to a DOS file which has spaces in the filename?
  • Download Code

Replies are listed 'Best First'.
Re: Answer: How do you open a filehandle to a DOS file which has spaces in the filename?
by scottstef (Curate) on Mar 15, 2001 at 10:00 UTC
    Thanks a lot, i also dealt with issue for several hours and could not find a solution in any of my manuals. Wish I knew how to use the search feature a little better when i wrote this code.
      my $filename = "this file has spaces.txt" open (SPACEY, "$filename") || die;
      Hardcoded filenames are unwise. Shouldn't the above work also? Didn't seem to.