git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
RDRogan Dawes <discard@dawes.za.net>
Date
Feb 24, 2006, 14:29 UTC
Message-ID
<43FF185C.1080909@dawes.za.net>
In-Reply-To
<81b0412b0602240527v5d617111sc33e627ff3e1641c@mail.gmail.com>
Alex Riesen wrote:
Show 28 quoted lines
> On 2/24/06, Rogan Dawes <discard@dawes.za.net> 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
Previous: Alex RiesenNext: Alex Riesen
Message 12 of 13 in “Convert open("-|") to qx{} calls”
  1. Convert open("-|") to qx{} callsJohannes Schindelin, Feb 23, 2006
  2. Alex RiesenFeb 23, 2006
  3. Randal L. SchwartzFeb 23, 2006
  4. Junio C HamanoFeb 23, 2006
  5. Randal L. SchwartzFeb 23, 2006
  6. Johannes SchindelinFeb 23, 2006
  7. Randal L. SchwartzFeb 23, 2006
  8. Alex RiesenFeb 23, 2006
  9. Randal L. SchwartzFeb 23, 2006
  10. Rogan DawesFeb 24, 2006
  11. Alex RiesenFeb 24, 2006
  12. Rogan DawesFeb 24, 2006
  13. Alex RiesenFeb 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.