# in master.pl my @done_list = glob("done*"); SLEEPY: while (1) { sleep(5); for my $done (@done_list) { next SLEEPY if ! -e $done; }; last; }; # cat files now: ####