my $pid = open my $child_fh, '|-' die "Can't fork: $!" if ! defined $pid; if ( $pid ) { # parent # feed LWP results into $child_fh close $child_fh; } else { # child # STDIN is the parent exit; }