When the number of leters is even, the ucfirst /\u/ will work on pairs of numbers matched above. if the length of the string was odd, the last character could be handled as a special case.perl -le '@l=("a".."z"); $_=join("",@l); s/../\u$&/g; print'
In reply to Re: uc() every other letter
by dcd
in thread uc() every other letter
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |