in reply to Running an external GUI program

There is about a 99% chance that syphilis's answer covers it. But for the record, if the program spawned by the GUI is not so well supported by Perl as to have a module for it, then Unix::PID might be useful, e.g.
use Unix::PID; my $ps = new Unix::PID -> new(); # wait for completion of GUI's subprocess $ps -> wait_for_pidsof("name of program spawned by GUI"); # kill the GUI process $ps -> kill( $ps -> get_pidof("name of GUI program") );
Mac OSX conforms sufficiently to Unix for the purposes of this module, although the module documentation doesn't appear to give a list of supported environments.

Update: in a multi-user environment parents and children would have to be user-id'd and matched up before doing the wait then kill.

-M

Free your mind