http://www.perlmonks.org?node_id=250589


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:
tr/\n/</
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