Subject: Re: [PATCH] Convert open("-|") to qx{} calls

From: Rogan Dawes <[email-masked]>
Date: Fri, 24 Feb 2006 16:29:48 +0200

Alex Riesen wrote:
> On 2/24/06, Rogan Dawes <[email-masked]> wrote:
> > Not true.
>>
>>  > type t
>> #!perl -w
>>
>> print qx{echo joe & echo joe}."\n";
>>  > perl t
>> joe
>> joe
>>
> 
> Does not seem to be the case here (and yes, I check build 815 too):
> 
> $ perl -v
> 
> This is perl, v5.8.6 built for MSWin32-x86-multi-thread
> (with 3 registered patches, see perl -V for more detail)
> 
> Copyright 1987-2004, Larry Wall
> 
> Binary build 811 provided by ActiveState Corp. http://www.ActiveState.com
> ActiveState is a division of Sophos.
> Built Dec 13 2004 09:52:01
> ...
> 
> $ perl -e 'print qx{echo joe & echo joe}."\n";'
> joe & echo joe

Interesting. I tried to do that one-liner at a DOS prompt (not cygwin, 
which I assume you are using), and I was unable to do so. CMD was seeing 
the "&" first, and splitting the command in 2, namely

perl -e 'print qx joe

and

echo joe}."\n";'

which obviously didn't work.

Do you get the same results if you run it from a DOS prompt? and via a file?

Rogan