How to replace the content of a file opened in append mode

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • das
    New Member
    • Sep 2006
    • 3

    How to replace the content of a file opened in append mode

    Hi,
    i m trying to open a file is append mode and replace the word after searching
    is it possible .........
  • GunnarH
    New Member
    • Nov 2006
    • 83

    #2
    The Tie::File module might be useful to you.

    Comment

    • miller
      Recognized Expert Top Contributor
      • Oct 2006
      • 1086

      #3
      GunnarH,

      That is an extremely useful module. Thanks so much for pointing it out.

      Comment

      • GunnarH
        New Member
        • Nov 2006
        • 83

        #4
        Originally posted by miller
        That is an extremely useful module. Thanks so much for pointing it out.
        You're welcome. Tie::File is part of Perl core, and the answer to the second FAQ entry in perlfaq5.

        Comment

        • miller
          Recognized Expert Top Contributor
          • Oct 2006
          • 1086

          #5
          Originally posted by GunnarH
          You're welcome. Tie::File is part of Perl core, and the answer to the second FAQ entry in perlfaq5.
          Ahhh, but according to the faq, it's only been part of the core libraries since 5.8. Yes, it's been a while since then, but I still haven't taken the time to upgrade all of my environments or discover what functionality I could be missing out on.

          Thanks for the inspiration.

          Comment

          Working...