#!/usr/bin/perl -w use POSIX; if ($pid = fork) { # parent open(OUT,">Test.txt"); print OUT "The process: $pid\n"; close(OUT); } else { # child exec("emulator.exe"); exit(0); }