perl -E 'while(-f $ARGV[0]){ $now=(stat(_))[9]; system($^X,@ARGV) if($now-$prev); $prev=$now; sleep 1}' /home/user/test.pl foo bar