# Lots of random code # unless (fork()) { exec "inter.exe", "--active"; } wait(); # Some remaining code #### # Lots of random code # my $pid=fork() // die "Can't fork: $!"; # on ancient perls: my $pid=fork(); defined($pid) or die "Can't fork: $!"; unless ($pid) { exec "inter.exe", "--active"; } waitpid($pid,0); # Some remaining code