Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: IPC::Run / bash pipe

by runrig (Abbot)
on Nov 07, 2013 at 00:56 UTC ( #1061510=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use IPC::Run qw(run);
    
    ...
    my $input = join("", map "$_\n", @arr);
    run [ sed => 's/[ad]/o/' ], "<", \$input, ">", \my $output;
    print "O: [$output]\n";
    
  2. or download this
    use IPC::Run qw(run);
    
    ...
    
    run [ echo => join("\n", @arr) ], ">", \my $output;
    print "O: [$output]\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1061510]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2014-12-18 23:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (69 votes), past polls