Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: What is the difference between s/ and tr/

by mce (Curate)
on Apr 15, 2003 at 15:05 UTC ( #250589=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://250589]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2022-01-25 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (66 votes). Check out past polls.

    Notices?