my $kid_pid = fork() or die "Cannot fork!\n"; exec( '/bin/ls' ) unless $kid_pid; my $keep_going = 1; while ( $keep_going ) { ... }