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 meditating upon the Monastery: (3)
As of 2017-11-25 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (355 votes). Check out past polls.

    Notices?