Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Non blocking read on a filehandle

by daveola (Sexton)
on Sep 24, 2008 at 09:53 UTC ( [id://713384]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # An non-blocking filehandle read that returns an array of lines read
    # Returns:  ($eof,@lines)
    ...
                ? $1 : '';
      $buf ? (0,split(/\n/,$buf)) : (0);
    }
    
  2. or download this
    $fh = new IO::File;
    open($fh,"$cmd 2>&1 |");
    ...
    } until $eof;
    
    close $fh;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-26 07:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found