| IO::Pipe(3perl) | Perl Programmers Reference Guide | IO::Pipe(3perl) |
IO::Pipe - supply object methods for pipes
use IO::Pipe;
$pipe = IO::Pipe->new();
if($pid = fork()) { # Parent
$pipe->reader();
while(<$pipe>) {
...
}
}
elsif(defined $pid) { # Child
$pipe->writer();
print $pipe ...
}
or
$pipe = IO::Pipe->new();
$pipe->reader(qw(ls -l));
while(<$pipe>) {
...
}
"IO::Pipe" provides an interface to creating pipes between processes.
These two handles are held in the array part of the GLOB until either "reader" or "writer" is called.
IO::Handle
Graham Barr. Currently maintained by the Perl Porters. Please report all bugs at <https://github.com/Perl/perl5/issues>.
Copyright (c) 1996-8 Graham Barr <gbarr@pobox.com>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| 2024-10-02 | perl v5.38.2 |