in reply to What if last line has no LF?
in thread Look ahead and join if the line begins with a +
You could also test to $_ upon exiting the loop, and act accordingly, probably undef'ing $_ withing the loop on each execution.
--
perl -pe "s/\b;([mnst])/'\1/mg"
|
|---|