# NOTE! this is only a general outline of the concept, # and is NOT actual working code. # wrapper.pl use strict; use warnings; my $flagfile = '/path/to/flag_file.txt'; # you might want to test and see if this exists first, indicating a possible # failure in code elsewhere. # # also, you might write the PID of the current process into the file so you # can check later if the process is still running if the file is present. open my $flag, '>', $flagfile; close $flag; my @script_params = ( '-opt1 yes', '-opt2 no', ); my $script = '/path/to/script.pl'; # use the multi-arg version of system to avoid lot's of gotchas. RTF(ine)M. system( $script, @script_params ); rm $flagfile; exit;