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

Re: close and autodie on pipes

by runrig (Abbot)
on Jun 29, 2012 at 19:55 UTC ( #979174=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $result = eval { close $fh };
    unless ($result) {
      print "Got an error: $@\n";
    }
    
  2. or download this
    my $result = eval {
      open my $fh, '-|', 'bash -c "echo Hello; exit 1"';
    ...
      close $fh;
    };
    ...
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (11)
As of 2016-06-29 21:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (387 votes). Check out past polls.