Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

That's right. As I said, the "open" that I am doing, is only _sometimes_ modifying the directory. I don't know why.

I would respectfully disagree with what some of the other Monks seem to be saying, is that overwriting a file, must touch the directory. As shown below.

the question is, why do my Perl scripts sometimes do it and sometimes don't - and I checked, all they do explicitly, is open for writing, and write, and close, not remove anything

The reason I care, is because I am a makefiles guy. As such, I don't want to touch _anything_ that does not need absolutely need to be touched, so that the system does not rebuild too much. Yes I do have dependencies on directories (meaning, their contents listing). When I do Perl scripts, sometimes, they will open an existing file for writing, and the directory gets touched. That's bad for me.

mgaleck{262}: touch test/foobar mgaleck{263}: ls -ld test drwxr-xr-x 2 mgaleck sw-team 138 Feb 5 03:30 test mgaleck{264}: date Tue Feb 5 03:31:12 PST 2013 mgaleck{265}: echo foobar > test/foobar mgaleck@hq1-up-swe-07{266}: ls -ld test drwxr-xr-x 2 mgaleck sw-team 138 Feb 5 03:30 test

In reply to Re^2: why does open ">..." sometimes touches the directory? by Mark_Galeck
in thread why does open ">..." sometimes touches the directory? by Mark_Galeck

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (7)
    As of 2014-07-13 16:47 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      When choosing user names for websites, I prefer to use:








      Results (250 votes), past polls