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:
---------------------------
Dr. Mark Ceulemans
Senior Consultant
IT Masters, Belgium
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 :-)tr/\n/</
---------------------------
Dr. Mark Ceulemans
Senior Consultant
IT Masters, Belgium
|
---|
In Section
Seekers of Perl Wisdom