use strict; my $pid = open my $pipe, "-|"; die "Can't fork: $!\n" if ! defined $pid; if( ! $pid ) { my $output = eval ...; print $output; exit; } local $/; my $output = <$pipe>; close $pipe; #### if( been_a_while() ) { system( $^X, $0, "--restart=$context", @ARGV ); }