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"
In reply to Re: What if last line has no LF?
by belg4mit
in thread Look ahead and join if the line begins with a +
by Rhodium
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |