in reply to Re: match a line and edit it
in thread match a line and edit it

May I know, How I can add a new line char with the line I am adding, like
if (/foo/) { $_ = "This is now bar\n"; }

I tried the above, but is not adding a new line, I tried to set autochomp => 0 also.