in reply to General Question: File triggered job launcher

You can use a / as the path separator on both UNIX and WIN32, give it a try. A useful data structure might be a hash like this:

# set up a hash that indexes each target dir to an array that # contains references to the actions we want to do on that dir my %dirs = ( dir1 => [ \&log, \&foo ], dir2 => [ \&log, \&bar ], dir3 => [ \&log, \&foo, \&bar ] ); for my $dir ( keys %dirs ) { do{ print "Skipping $dir\n"; next } unless check($dir); for my $action_sub ( @{$dirs{$dir}} ) { &$action_sub($dir); } } sub check { # perform a check that we are ok to go, return true if so return 0 if $_[0] eq 'dir2'; # fake it to skip dir 2 return 1; } sub log { print "Doing log to $_[0]\n"; } sub foo { print "Doing foo to $_[0]\n"; } sub bar { print "Doing bar to $_[0]\n"; } __END__ Doing log to dir1 Doing foo to dir1 Skipping dir2 Doing log to dir3 Doing foo to dir3 Doing bar to dir3
cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print