in reply to How to eliminate "/n" from text

perldoc -f chomp

chomp removes trailing newline characters.