qw is for taking a set of tokens, separated by whitespace, and returning a list. You're assigning into a scalar, which makes no sense. In this case, it will give you the last value in the list, which is "Files\Rational\ClearCase...". I think you meant q instead of qw.
<br><br>&nbsp; my $commLine = q!&quot;\\Program Files\\Rational\\ClearCase\\bin\\clearexplorer.exe&quot;!;<br><br>might do what you want. Although you might want to check if Windows will let you use forward slashes instead of backslashes; if so, you can use:
<br><br>&nbsp; my $commLine = q!&quot;/Program Files/Rational/ClearCase/bin/clearexplorer.exe&quot;!;<br>
<br>Another option to avoid the problem of quoting is to prevent system from passing the command to the shell. If you had any command-line arguments, that would be easy, but since you don&#39;t, you can force it with the bizarre
<br><br>&nbsp; my $commLine = q!\\Program Files\\Rational\\ClearCase\\bin\\clearexplorer.exe!;<br>&nbsp; system {$commLine} $commLine;<br><br>This uses the first $commLine as the program to run, and the second to tell the OS what the name of the program that you&#39;re running is (in case you want to lie.) So this should also work:
<br><br>&nbsp; my $commLine = q!\\Program Files\\Rational\\ClearCase\\bin\\clearexplorer.exe!;<br>
&nbsp; system {$commLine} &quot;clear explorer, dude&quot;;<br>
<br>Strangely, further arguments come after the second one. So if you were to pass in the value 12, this would become:<br><br>
&nbsp; my $commLine = q!\\Program Files\\Rational\\ClearCase\\bin\\clearexplorer.exe!;<br>

&nbsp; system {$commLine} &quot;blahblah&quot;, &quot;12&quot;;<br><br>or<br>

<br><div>&nbsp; my $commLine = q!\\Program Files\\Rational\\ClearCase\\bin\\clearexplorer.exe!;<br>


&nbsp; system {$commLine} (&quot;blahblah&quot;, &quot;12&quot;);<br>
<br>Except in that case, you have a command line argument, so it&#39;s much easier:<br><br>&nbsp; my @command = (q!\\Program Files\\Rational\\ClearCase\\bin\\clearexplorer.exe!, &quot;12&quot;);<br>



&nbsp; system @command;<br><br><span class="gmail_quote">On 1/22/07, <b class="gmail_sendername"><a href="mailto:nheller@silcon.com">nheller@silcon.com</a></b> &lt;<a href="mailto:nheller@silcon.com">nheller@silcon.com</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Here&#39;s a short example script.&nbsp;&nbsp;My system can&#39;t find the executable.&nbsp;&nbsp;I&#39;m
<br>sure there must be an easy solution - but what?<br><br>#!Perl&nbsp;&nbsp;-w<br><br>use warnings;<br>use strict;<br><br>my $commLine = qw &quot;\&quot;\\Program<br>Files\\Rational\\ClearCase\\bin\\clearexplorer.exe\&quot;&quot;;
<br><br>system $commLine;<br><br>my $foo = 1;<br><br>Neil Heller<br><br><br>&gt; On Sat, Jan 20, 2007 at 02:12:12PM -0800, Michael Friedman wrote:<br>&gt;<br>&gt;&gt; Sometimes it pays to ask the seemingly obvious question...
<br>&gt;&gt; Did you try putting the path in quotes?<br>&gt;<br>&gt; Exactly my thought.<br>&gt;<br>&gt;&gt; How about escaping the space?&nbsp;&nbsp;&quot;Program\ Files&quot;.<br>&gt;<br>&gt; In Windows, I believe, you&#39;d have to do something like this:
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; system qq{chdir &quot;Program Files&quot;};<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; # or<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; system qq{chdir &quot;$dir&quot;};<br>&gt;<br>&gt; --the reason being that the Windows command shell doesn&#39;t have single<br>
&gt; quotes the way bash (for instance) does.<br>&gt;<br>&gt; Caveat hacker:&nbsp;&nbsp;I don&#39;t have a Windows box, so I didn&#39;t test this.&nbsp;&nbsp;I&#39;m<br>&gt; just going from memory.<br>&gt;<br>&gt; --<br>&gt; Quinn Weaver, independent contractor&nbsp;&nbsp;|&nbsp;&nbsp;President, San Francisco Perl
<br>&gt; Mongers<br>&gt; <a href="http://fairpath.com/quinn/resume/">http://fairpath.com/quinn/resume/</a>&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;<a href="http://sf.pm.org/">http://sf.pm.org/</a><br>&gt; _______________________________________________<br>
&gt; SanFrancisco-pm mailing list<br>&gt; <a href="mailto:SanFrancisco-pm@pm.org">SanFrancisco-pm@pm.org</a><br>&gt; <a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm">http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
</a><br>&gt;<br><br>_______________________________________________<br>SanFrancisco-pm mailing list<br><a href="mailto:SanFrancisco-pm@pm.org">SanFrancisco-pm@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm">
http://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a><br></blockquote></div><br>