On Wed, 2004-04-14 at 08:18, Juerd wrote:
> Perl 5 has the qx// operator which does readpipe. I believe the function
> for it was added later. (It doesn't handle a LIST as system does,
> unfortunately.) qx// is also known as ``. Two backticks.
>
> readpipe/qx/`` isn't used much. In all my @INC, only a handful of uses
> can be found. Most are in Debian's modules.
>
> Why should readpipe get to cheat on the huffman thing?
>From a source tree I work with (which I cannot divulge code from, but I
think statistics like this are fine):
$ find . -name \*.pl | wc -l
330
$ find . -name \*.pl -exec grep -hlE 'qx|`|`|readpipe' {} \; | wc -l
123
`` gets used an awful lot, just usually not in modules where the process
control issues surrounding even system() tend to yield a module unusable
for the general case, even though it might be fine in a more specific
one.
I could take or leave `` because I don't like unbalanced quote
operators, and I see qx{} as just as good if not better, but to remove
it on the basis of the lack of use is faulty.
I would have preferred that Perl 6 used the bash/zsh-style:
$(...)
But we have other designs on that.
--
Aaron Sherman <[EMAIL PROTECTED]>
Senior Systems Engineer and Toolsmith
"It's the sound of a satellite saying, 'get me down!'" -Shriekback