in reply to Re^3: Resseting perl -M file mod after xx minutes
in thread Resseting perl -M file mod after xx minutes

It will be processed, just 10 seconds later (or some multiple thereof). I don't know what point you are trying to make.
  • Comment on Re^4: Resseting perl -M file mod after xx minutes

Replies are listed 'Best First'.
Re^5: Resseting perl -M file mod after xx minutes
by mzedeler (Pilgrim) on Jul 12, 2009 at 20:48 UTC

    If the goal is to process any files that are older than a given value, even if there is just one file, then the script doesn't work as it should.

      You presume that "as it should" means there isn't a minimum number of files required. I don't see any indication your assumption is true — in fact, it seems to contradict the printed message — but if it is,
      if (scalar(@Files) > 1) {
      or
      if (@Files > 1) {
      should be replaced with
      if (scalar(@Files) > 0) {
      or
      if (@Files > 0) {
      or
      if (@Files) {

        The reason that I raised the question in the first place, is that skipping the directory scan just because there is just one file seems like a very strange thing to do. Even if its a conscious decision made by learningperl01 (note the handle), I still believe its appropriate to raise the question, since it looks like a classical off by one error.

        The printed error message could just be a sloppy way of writing there are no files to process, but we're hardly getting anything out of discussing it further, since learningperl01 isn't following the thread any longer.