in reply to What is the difference between s/ and tr/

The difference is that the s does a regular expression/substitution and the tr a transliteration.
tr replaces each occurrence of a character by the other, so you actually wrote:
so, replace each new line with a <. Start by reading perldoc perlop, and learn it by heart :-)
Dr. Mark Ceulemans
Senior Consultant
IT Masters, Belgium