Thanks, I was thinking along those lines and wrote some code to try and do that. However, Deltas only get populated when changes occur. So in the end, it appears the file actually has to change for me to get mtime? That doesn't seem to make sense.

This line from the doc is what throws me:

"The state of the monitored file or directory at the time of the last scan can be queried. Before scan is called these methods will all return undef."

Am I nuts or does that seem to indicate you can simply call on the methods after the initial scan is run?

The trouble is I want to determine if I should exit after the first scan based on an mtime passed on the command line. If the file's mtime and the mtime passed in are true in some relative way (lt,gt,ne,eq) then there's no need to go further and do deltas.

In reply to Re^2: Accessing File::Monitor attribute by herda05
in thread Accessing File::Monitor attribute by herda05

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.