Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: uc and lc function

by hiseldl (Priest)
on Sep 26, 2002 at 02:55 UTC ( [id://200797]=note: print w/replies, xml ) Need Help??


in reply to uc and lc function

Update: Abstraction is correct. Assigning to the same var works too. Also, if you use tr you may have problems with wide characters.

You should assign the result of uc(...) to another variable.

$name = "world"; $uc_name = uc($name); print $uc_name,$/;

if you want to change the case of the current variable, you could use tr.

$name = "world"; $name =~ tr/[a-z]/[A-Z]/; print $name, $/;

--
hiseldl
"Act better than you feel"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-23 13:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found