Think about Loose Coupling | |
PerlMonks |
Re: What is the difference between s/ and tr/by mce (Curate) |
on Apr 15, 2003 at 15:05 UTC ( [id://250589]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|