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...

In reply to Re^2: Missing files & File::Find.pm by sbas013
in thread Missing files & File::Find.pm by sbas013

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.