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

Re^2: stripping characters from a string

by ayrnieu (Beadle)
on Mar 06, 2006 at 09:41 UTC ( #534655=note: print w/replies, xml ) Need Help??


in reply to Re: stripping characters from a string
in thread stripping characters from a string

I'd prefer this, actually:

for ($string) { tr/ '/_/d; print }

Replies are listed 'Best First'.
Re^3: stripping characters from a string
by Samy_rio (Vicar) on Mar 06, 2006 at 09:59 UTC

    ayrnieu, OP's need

    Good_Ol_Time

    but your output shows

    Good_O l_Time

    As per perlfunc - Perl builtin functions tutorial.

    y///
    The transliteration operator. Same as tr///.

    Updated: ayrnieu updated his answer without proper information.

    Regards,
    Velusamy R.


    eval"print uc\"\\c$_\""for split'','j)@,/6%@0%2,`e@3!-9v2)/@|6%,53!-9@2~j';

      ah, "and remove any '". I know what y/// is, I just don't know why anyone would use it. Why do you have a \ ?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2022-01-21 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (57 votes). Check out past polls.

    Notices?