if ($pid = open ($fifo, "|-")) # cookbok 16.11 open for r and w to avaoid blocks { $fifo->autoflush(1); no warnings; foreach my $ky (sort keys %categories) { print $fifo "$categories{$ky}#"; } close $fifo or die $! ? "Syserr closing fifo writer: $!" : "Wait status $? from fifo writer"; } else # child { die "Cannot fork: $!" unless defined $pid; # copy from parent (now stdin) into the file # need to redirect stdin? #$fifofile->autoflush(1); while () { $fifofile = $_; # print $fifofile; system "sqlldr control=atpctl.ctl data=atp_fifo.dat userid=someuser/pwd log=loader.log"; } exit; # Don't forget to make the fifo disappear. }