$ ls -l monlog.txt -rw------- 1 h h 10755194 2008-05-30 12:59 monlog.txt $ perl -le 'print scalar localtime((stat)[9]) for @ARGV' monlog.txt Fri May 30 12:59:45 2008 $ perl -MFile::stat -le 'print scalar localtime(stat($_)->mtime) for @ +ARGV' monlog.txt Fri May 30 12:59:45 2008
Worked pretty well here. What do you mean with "i use the local time module to build a time function to tell me what time it is, and anytime the use::localtime module is active and i use the localtime function i get errors"?? If you have a local "localtime.pm" module, change its name and the name of the "faux-localtime" function, because it's not good practice to clobber core functions' names.
Update: used File::stat like becca23 did.
[]s, HTH, Massa (κς,πμ,πλ)

In reply to Re^3: Getting the timestamp of a file by massa
in thread Getting the timestamp of a file by becca23

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.