Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

perlfunc:uc

by gods
on Aug 24, 1999 at 22:42 UTC ( #269=perlfunc: print w/replies, xml ) Need Help??

uc

See the current Perl documentation for uc.

Here is our local, out-dated (pre-5.6) version:


uc - return upper-case version of a string



uc EXPR

uc



Returns an uppercased version of EXPR. This is the internal function implementing the \U escape in double-quoted strings. Respects current LC_CTYPE locale if use locale in force. See the perllocale manpage.

If EXPR is omitted, uses $_.


Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[ovedpo15]: another question about regex. if I have a string like this: "a/b/,c/d/e,5" I would like to remove the string after the last comma so the output will be "a/b/,c/d/e" how to do so?
[Corion]: ovedpo15: You could split on comma, and then join everything together, except the last part. Or you could match and make sure that the last part has no comma, like qr!,[^,]+$!, or you could use rindex.
[ovedpo15]: But I don't know the length of the string. will it still work?
[ovedpo15]: The only thing I know is that there is a comma at the end and a value after that
[hippo]: Try it and see. Your computer won't explode.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2018-05-27 10:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?