my $child_pid = open my $child_fh, '-|'; if ( ! defined $child_pid ) { die "Can't fork: $!"; } if ( $child_pid ) { # parent my $child_says = do{ local $/; <$child_fh> }; close $child_fh; } else { # child # ... process your heart out ... print "my result"; }