That code I last posted could have been better. I left in something unnecessary and then didn't make the regex as good as it could've been. This should quit every process except MacPerl and the Finder. I tested it in reverse (i.e., specified a process TO kill) and it was fine. #!perl -w use strict; use Mac::AppleEvents; use Mac::Processes; &test1; sub test1 { my ($psn,$pi); while (($psn, $pi) = each %Process) { if ($pi->{processSignature} !~ /^(MACS|McPL)$/o) { AESend( AEBuildAppleEvent('aevt','quit',typeApplSignature, $pi->{processSignature},0,0,''),kAEWaitReply ); } } } -- Chris Nandor pudge@pobox.com http://pudge.net/ %PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10 1FF7 7F13 8180 B6B6']) ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch