The code jesuashok posted was simply copied verbatim from the example section of perldoc entry for close
, even to the point of including the comment containing the ellipses "#...":
open(OUTPUT, '|sort >foo') # pipe to sort
or die "Can't start sort: $!";
#... # print stuff to output
close OUTPUT # wait for sort to finish
or warn $! ? "Error closing sort pipe: $!"
: "Exit status $? from sort";
open(INPUT, 'foo') # get sort's results
or die "Can't open 'foo' for input: $!";
Refer to this node for further discussion of jesuashok's posting habits.