Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Replacing a character in a string

by chibiryuu (Beadle)
on Nov 15, 2005 at 21:24 UTC ( [id://508796]=note: print w/replies, xml ) Need Help??


in reply to Replacing a character in a string

Even if you didn't know about ucfirst, it's easy enough to do with quoting:

"\u$_"

Or with a regex, if you didn't know about that either, but that's weird.

s/(.)/uc$1/e

Replies are listed 'Best First'.
Re^2: Replacing a character in a string
by ikegami (Patriarch) on Nov 15, 2005 at 21:27 UTC

      As long as we're getting silly ...

      $s &= ~' ';
      (Warning: may not work for non-7-bit-ASCII letters such as accented characters, Cyrillic characters, or anything in EBCDIC. Or even any characters that aren't actually letters. But it is fun to do.)

        Cute :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 19:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found