Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: problems with tr///;

by suaveant (Parson)
on Sep 25, 2001 at 22:31 UTC ( [id://114614]=note: print w/replies, xml ) Need Help??


in reply to problems with tr///;

I think you want
$script =~ tr/\\//d;

                - Ant
                - Some of my best work - Fish Dinner

Replies are listed 'Best First'.
Re: Re: problems with tr///;
by Anonymous Monk on Sep 25, 2001 at 22:33 UTC
    I think you're right. It's odd, but none of the books or docs that I have show any flags to run tr/// with... Thanks for your help on an insanely moronic question <you guys here are always nice, even when dumb questions are asked> Thanks again!
    Justin
      Check out perldoc perlop for the options to tr. As it appears our site docs are still a bit old, here is an excerpt from a Perl5.6.0 dist:
      c   Complement the SEARCHLIST.
      d   Delete found but unreplaced characters.
      s   Squash duplicate replaced characters.
      U   Translate to/from UTF-8.
      C   Translate to/from 8-bit char (octet). 
      

      jeffa

      none of the books or docs that I have show any flags to run tr/// with

      perldoc perlop
      It's odd, but none of the books or docs that I have show any flags to run tr/// with
      Please list the names of those books, so we can be sure to dis-recommend them for others.

      -- Randal L. Schwartz, Perl hacker

      My copy of the Camel certainly mentions all the tr///; switches. But, I'll admit when I first started Perl I would buy these books off the Street Vendors in NYC for $5. I got the Dummies book and one about Perl for Windows NT Servers. Both of them were barely worth even the little cash I shelled out, and left out major details. The O'Reilly books are popular for a reason.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://114614]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-03-29 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found