[sf-perl] Windows Perl question
nheller at silcon.com
nheller at silcon.com
Mon Jan 22 10:49:26 PST 2007
Here's a short example script. My system can't find the executable. I'm
sure there must be an easy solution - but what?
#!Perl -w
use warnings;
use strict;
my $commLine = qw "\"\\Program
Files\\Rational\\ClearCase\\bin\\clearexplorer.exe\"";
system $commLine;
my $foo = 1;
Neil Heller
> 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/
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
>
More information about the SanFrancisco-pm
mailing list