#!/usr/bin/perl # # http://omaha.pm.org/emails/2003/msg00131.html # my $program = "/usr/bin/perl /home2/jhannah/loop.pl"; my $foundit = 0; open (IN, "ps axw |"); while () { if (/$program/) { $foundit = 1; last; } } close IN; unless ($foundit) { system("$program &"); } # # End of file