my $pid = fork || exec 'play "/home/myname/soundfile.wav" &'; sleep 5; kill $pid;