Changing Case

They have: 23 posts

Joined: Jan 2001

Is there a quick regexp to change case? It seem so simple but I can seem to find anything on it.

They have: 850 posts

Joined: Jul 1999

You can either use the functions uc() and lc() or use the \U and \L string escapes.

example:
my $name = 'RoBeRt';
print $name = lc($name);#output robert
print $name = uc($name); #output ROBERT
print $name = "\L$name"; #output robert
print $name = "\U$name";#output ROBERT
'

hope that helps

They have: 23 posts

Joined: Jan 2001

That's great! It's so simple. Thanks!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.