Good point about the paragraph mode, but he's not reading anything from a file opened write-only.
However, if he was reading a paragraph, it wouldn't be the first line of the paragraph he would be replacing.
The text replace would be the last line of the paragraph plus the two or more newlines that delimited the paragraph. Somehow I doubt that this was his intention, but the point is mute until he manages to read something in.
Seems we both need to read perlop, and possibly perlre as well ....
Examine what is said, not who speaks.
The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.
In reply to Re: Re^2: modifying a line in a file with some restrictions
by BrowserUk
in thread modifying a line in a file with some restrictions
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |