in reply to pure perl tail

Or even tail.

Some of the things you could do better, use /\r?\n|\r/ to check EOL. Use perl -l, don't undef $/, and don't print a newline. Have you considered a pipe?

--
perl -pew "s/\b;([mnst])/'$1/g"