in reply to Re^2: conditional calling of script from other script
in thread conditional calling of script from other script
First of all, to answer your question directly, just have script1 check for the existence of a particular file; if that file doesn't exist, create it and run script2:
my $LOCKFILE = 'script1.lock'; if (!-e $LOCKFILE) { open FH, ">$LOCKFILE" or die $!; close FH; system("perl script2.pl"); }
However, if they're both perl scripts, it seems silly to do a fork and invoke another perl interpreter to run it. Can't you just use or require it and call whatever function(s) you need directly?
-b
|
|---|