The -M file test operator above always turns True and exits, even though the logfile is newly generated. I beleive that this could be due to the mtime not being refreshed and hence the error. I get this error whether a previous logfile exists or if the logfile is newly created. Any suggestions as to how this problem could be rectified is welcome. Thanks, Bayruds##BEGIN CODE &setup_command(); #setup command of 3rd party script to run &run_command(); #Run 3rd party script. script generates #file.log my $logfile = "file.log"; if (-M "$logfile" > 0) { print "The logfile generated by 3rd party script is not new\n"; exit(1); } ##END CODE
20040728 Edit by ysth: adjust code tags to only span code
In reply to -M file test operator by bayruds
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |