develooper Front page | perl.perl5.porters | Postings from August 2013

[perl #4574] readpipe() broken: 2 bugs

Thread Previous | Thread Next
From:
l.mai@web.de via RT
Date:
August 17, 2013 09:07
Subject:
[perl #4574] readpipe() broken: 2 bugs
Message ID:
rt-3.6.HEAD-2552-1376730439-1578.4574-15-0@perl.org
On Wed Nov 01 09:14:00 2000, ilya@math.ohio-state.edu wrote:
> 
>   ./perl -wle 'print readpipe($^X, "-e", q(printp "12\n"))'
>   sh: printp: not found
>   ./perl-e
> 
> I can see 2 bugs here:
> 
>   a) readpipe is not a list operator, as it should be (see my patch
>      which made it a list operator);
> 
>   b) ($^X, '-e') "leak" to print().

First off, this bug still exists in 5.19.

Second, you can also get the inverse of b), i.e. stealing args from print:

% perl -we 'print "Just ", "echo another Perl hacker,", readpipe +()'
Just another Perl hacker,


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=4574

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About