home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


pipe

pipe 
readhandle
, 
writehandle

Opens a pair of connected pipes. This call is almost always used right before a fork , after which the pipes reader should close writehandle , and the writer should close readhandle . (Otherwise the pipe won't indicate EOF to the reader when the writer closes it.) Note that if you set up a loop of piped processes, deadlock can occur unless you are very careful. In addition, note that Perl's pipes use standard I/O buffering, so you may need to set $| on your writehandle to flush after each output command, depending on the application - see select filehandle .


Previous: Reference: package Perl in a Nutshell Next: Reference: pop
Reference: package Book Index Reference: pop

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.