in reply to Re: Replace a line with a new one
in thread Replace a line with a new one

Thanks so much for the good advice.
I just tried your code and it works well - however - it behaves the same as the original in that it just keeps adding another line every time it runs - instead of overwriting the previous line written. It appends another line right behind the previous one.
The other code added a new line just under the previous line.
Any further thoughts?
Thanks again for responding.

Replies are listed 'Best First'.
Re: Re: Re: Replace a line with a new one
by nothingmuch (Priest) on Oct 14, 2002 at 22:39 UTC
    Ah, ok... I understood from the code that you are trying to join the strings, from the concatenation operator ^_^. I should make it a habit to make notice of the english...
    $_ = "my newline\n" if ($i == 3); print TEMP $_;
    hope this works...

    -nuffin zz zZ Z Z #!perl