in reply to Re: ucfirst(uclast(lc($user))) ?
in thread ucfirst(uclast(lc($user))) ?
/e is a bit excessive here, isn't it? :) Also, you may want to only match against (\w) instead of (.). No reason to try to uppercase a funny character!
sub uclast ($) { my $foo = shift; $foo =~ s/(\w)$/\u$1/; return $foo; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: ucfirst(uclast(lc($user))) ?
by Juerd (Abbot) on Mar 09, 2002 at 23:24 UTC |