[sf-perl] Windows Perl question

Quinn Weaver quinn at fairpath.com
Sun Jan 21 20:39:39 PST 2007


On Sat, Jan 20, 2007 at 02:12:12PM -0800, Michael Friedman wrote:

> Sometimes it pays to ask the seemingly obvious question...
> Did you try putting the path in quotes?

Exactly my thought.

> How about escaping the space?  "Program\ Files".

In Windows, I believe, you'd have to do something like this:

    system qq{chdir "Program Files"};
    # or
    system qq{chdir "$dir"};

--the reason being that the Windows command shell doesn't have single
quotes the way bash (for instance) does.

Caveat hacker:  I don't have a Windows box, so I didn't test this.  I'm
just going from memory.

--
Quinn Weaver, independent contractor  |  President, San Francisco Perl Mongers
http://fairpath.com/quinn/resume/     |  http://sf.pm.org/


More information about the SanFrancisco-pm mailing list