Hi Bayruds,
First, a quick note about formatting your posts: put "<code>" and "</code>" at the beginning and end of perl code -- not including paragraphs of text (use plain old html tags like <P>, <UL>, etc to format your text). It's easy to get to Writeup Formatting Tips -- take a look at that.
Second, how about you try one more diagnostic: create a junk file (or locate such a file that already exists), and give the path/name of that file as a command line arg to this little script:
#!/usr/bin/perl
print "-M of $ARGV[0] is ".(-M $ARGV[0]).$/; # should be positive
system("touch $ARGV[0]"); # reset file's mod time to now.
sleep 1
print "-M of $ARGV[0] is now ".(-M $ARGV[0]).$/; # should be (very sma
+ll) negative
sleep 4;
print "-M of $ARGV[0] is now ".(-M $ARGV[0]).$/; # should be equal to
+previous
If the outputs disagree with the comments, you might have a deep problem -- you may need to report which OS you're using, and which perl version. (Maybe even what sort of hardware you have.)
You seem to be doing the right sort of test (-M>0), so it could still be one of those cases where you really believe that you're checking the right file (the same one that the 3rd party thing created), and that the file is new, etc, when in fact...
update: fixed link |