in reply to Missing files & File::Find.pm

Maybe if we could see the script, we could offer some insight. Please note that if you do modify your post to show some code, be sure to enclose your code in tags (ie. <code>perl code goes here</code>). The code tags make it look nice.

Since you're new to PerlMonks, you may want to take a look at these fine nodes that offer insight into posting effectively on PerlMonks:

  • How (Not) To Ask A Question]
  • How do I post a question effectively?
  • Replies are listed 'Best First'.
    Re^2: Missing files & File::Find.pm
    by sbas013 (Initiate) on Feb 07, 2007 at 15:00 UTC
      I'm sure it show's it my first attempt at posting a question. I will read the advice on asking and posting questions. I certainly don't intend to post too many questions, I have been using Perl for some years and this is only the second time I have been stumped.

      I have spent some hours looking on the internet but I couldn't find anything that even hinted at problems with File::Find. In one respect it's a good thing, points to dodgy coding. The sad thing is (A) it's difficult to get wrong, (B) The script works perfectly on two other servers (non 64 bit).

      This script amounts to 500 lines a great percentage of which are comments. The bare essentials:-

      use File::stat;<BR> use File::Find;<BR> use Getopt::std;<BR> use Time::Local;<BR> use DateTime.pm; # Home grown<BR> use Extras; # Ditto<BR> ... find (\&Process_Directory, $TreeTop);<BR> ...<BR> ...<BR> # Close Report Files etc. exit;<BR> sub Process_Directory { $File = $File::Find::name; $Last_Modified = $Inode->mtime; $Last_Accessed = $Inode->atime; $Size = $Inode->size; ${@{$Year_Prof[$File_Age_Yrs]}}[1] += 1; ${@{$Year_Prof[$File_Age_Yrs]}}[2] += $Size; printf F_REP ("%02d/....,..."; <BR> if ( $EXCEL ) { print F_EXC "..."; } return; }
      From the above info I work out the age of the file in years and store the info in an array, noting the cumulative file sizes and file counts. The script produces a couple of reports, plain text and psv (Pipe'|' separated variable) for Excel. The idea is that we can target files of a certain age for archiving.

      I get the feeling that it may be a cummulative type of error, I need to clear something down OR it's just the bizarre directories and file names. The full path name on some files can run into hundreds of character, java~esk...

      Apologies for being a pest I was hoping it would be something obvious, use a different package or something.

      Thanks for quick response.

      Regards,

      Simon
      PS Puting the sub beneath instead of before the call probably shows my age...