Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Answer: How do i escape a '/' character when using tr?

by merlyn (Sage)
on Aug 21, 2000 at 20:43 UTC ( #28841=categorized answer: print w/replies, xml ) Need Help??

Q&A > strings > How do i escape a '/' character when using tr? - Answer contributed by merlyn

That's odd.
$count_slash = tr/\///;
works just fine in my copy of Perl. Or you can use an alternate delimiter:
$count_slash = tr#/##;

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2017-07-26 02:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (383 votes). Check out past polls.