Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by turnstep (Parson)
on Apr 28, 2000 at 22:10 UTC ( [id://9616]=note: print w/replies, xml ) Need Help??


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;

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://9616]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-03-19 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found