http://qs321.pair.com?node_id=378255

bayruds has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
I am running a perl script as follows:
##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
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

20040728 Edit by ysth: adjust code tags to only span code