Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Improve pipe open?

by afoken (Canon)
on Apr 01, 2017 at 15:17 UTC ( #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? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2022-01-21 20:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (59 votes). Check out past polls.

    Notices?