#!/usr/bin/perl my $fname = "/tmp/help.txt"; system("echo help me > $fname"); my $pid = fork(); if ($pid eq 0) { sleep (1); system ("xterm -T hello -e tail -f $fname &"); exit(-1); } print "This is not the correct pid: $pid \n"; sleep(5); print "After some point in time, I want to kill $pid! \n"); system ("kill -9 $pid"); print "$pid is incorrect!\n";