Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://223460]
[Discipulus]: if i had to go to psycho i need to ask why i always end with over complex datastructure: now i have an HoHoAoH in my object
[Discipulus]: i will need to handle by reference later on
[Eily]: kinda sounds like father Christmas is late
[hippo]: (asking because I'm sure you said before about learning English) Did you know there are 2 different words for smaller quantities in English? They are "less" and "fewer". Fewer applies to a number of discrete things like days.
Eily notes also
[hippo]: So if you don't drink as much milk and not as often you are said to drink less milk on fewer days. Confusing, eh?

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2018-01-23 09:06 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (242 votes). Check out past polls.