Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Improve pipe open?

by afoken (Chancellor)
on Apr 01, 2017 at 15:17 UTC ( [id://1186687]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open(my $pipe,'-|','/usr/local/bin/foo','bar','baz','1&2>3') or die "C
    +an't start foo: $!";
    my @output=<$pipe>;
    close $pipe or die "Broken pipe: $!";
    
  2. or download this
    my @output=safe_qx('/usr/local/bin/foo','bar','baz','1&2>3');
    
  3. or download this
    > perl -E 'open my $pipe,"-|","pstree --ascii --arguments --long $$ 1>
    +&2" or die $!;'
    perl -E open my $pipe,"-|","pstree --ascii --arguments --long $$ 1>&2"
    + or die $!;
      `-sh -c pstree --ascii --arguments --long 22176 1>&2
          `-pstree --ascii --arguments --long 22176
    >
    
  4. or download this
    open $list[0] my $pipe,'-|',@list or die "Can't open pipe: $!";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://1186687]
Front-paged by Discipulus
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-03-28 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found