use strict; use Daemon::Easy sleep=>5, stopfile=>'stop', pidfile=>'pid', callback=>'worker'; use File::Find qw~find~; run(); sub worker { die 'Improper setup -- must have an ./old folder!' unless (-d './old'); die 'Improper setup -- must have a ./pass folder!' unless (-d './pass'); find(\&wanted, qw~/tmp/working/perlmonks/lib/11156715~); } sub wanted { if ( (-f $File::Find::name) && ($File::Find::name=~m/\.pl$/ ) && ($File::Find::name !~m/code\.pl$/) ) { print "open the file, replace comments, resave orig. to old folder and updated one to pass folder --- $File::Find::name\n"; } } #### #!/bin/bash perl -pi.bak -e 's{a}{b}g' $1