in reply to Write to filehandle without deleting current text

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re: Write to filehandle without deleting current text

Replies are listed 'Best First'.
Re^2: Write to filehandle without deleting current text
by JavaFan (Canon) on Oct 05, 2010 at 10:07 UTC
    If appending isn't satisfactory and you want to modify existing content you are going to have to go lower level. Open is no longer friend. sysopen is the man for the job.
    Bollocks.

    open my $fh, "+<", $filename; and open my $fh, "+>>", $filename; allow read-write and read-append access to the file. No need for sysopen here.

      Hmmm...thanks! Didn't know that!