in reply to Upper case first letter of each _ delimited word
Updated to fix the bugs tilly mentions below.sub ucwords { join $_[1], map ucfirst lc, split /\Q$_[1]\E/, $_[0], -1; }
To be called like:
There may be a faster way, and if there is I'm sure someone'll point it out. :)print ucwords("BATCH_USER_INFO", "_");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: Upper case first letter of each _ delimited word
by tilly (Archbishop) on Dec 05, 2000 at 03:25 UTC | |
|
Re: Re: Upper case first letter of each _ delimited word
by japhy (Canon) on Dec 05, 2000 at 02:44 UTC | |
by chipmunk (Parson) on Dec 05, 2000 at 03:10 UTC | |
by btrott (Parson) on Dec 05, 2000 at 03:01 UTC |