Unless I'm missing something, chop will take of the end of line character first, based on $/. So you'd have to chomp (to safely remove the possibly non-existent end of line character) then chop. Then put the end of line character back on, assuming there was one to begin with. Or chop once, check to see if it was an eol character, and chop again for the comma and tack the eol character back on.
So. Am I missing something obvious here?