Rolands answer hits the nail right on the head. If you upgrade skip right to 5.8.0 or higher. Also available on my ITRC site:
http://www.cmve.net/~merijn or
https://www.beepz.com/personal/merijnchomp is a `safe' vaersion of chop, which only chop's if the last `character' is the input record separator (\n or newline by default)
perl4's version of chomp
s/($/)?$//
Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn