in reply to Converting letters from uppercase to lowercase.
Another way is to get fancy with map and split.
This assumes that the data is in $_, like from a (<FH>) read...
Or assign to an array:print join "\n", map{ join " ",map{ ucfirst(lc) } split / / } split /\|/;
@array = map{ join " ",map{ ucfirst(lc) } split / / } split /\|/;
Sorry if it is a little obfuscated, but I think I still have a little of it in my blood from the weekend ;)
This is really nothing more than mapping the ucfirst and lc onto the split of a split. I found I had to do it this way to avoid the dreaded implicit split to @_ depricated message.
D a d d i o
|
|---|