Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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?
LanX ♪..♫ Fiesta, fiesta mexicana ... ♪..♫
[mandarin]: LanX aren't you a bit late to the party?

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (11)
As of 2018-06-18 17:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (110 votes). Check out past polls.

    Notices?