Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: tr/// vs s/// The question.

by lemming (Priest)
on Dec 31, 2002 at 20:58 UTC ( #223460=note: print w/replies, xml ) Need Help??


in reply to tr/// vs s/// The question.

tr/[^A-Za-z0-9_ ]//d is the same as tr/A-Za-z0-9_ ]^[//d

tr doesn't pay attention to the brackets and treats them as characters.

You'll have better luck with tr/A-Za-z0-9_ //cd
the c stands for complement, d for delete. See perldoc perlops for more info

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://223460]
help
Chatterbox?
[Discipulus]: eh eh.. almost.. Discipulus's scratchpad
[choroba]: The previous line tells it all.
[choroba]: "Out of memory!" - anything can happen afterwards

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2018-02-21 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (280 votes). Check out past polls.

    Notices?