Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 scrutinizing the Monastery: (8)
As of 2017-03-29 08:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (344 votes). Check out past polls.