You should probably read about uc, lc, and ucfirst.#!/usr/bin/perl -wT use strict; my $string = 'abc def GHI JkLMno pQrSTUv'; my @words = map {ucfirst(lc($_))} split(' ',$string); # Abc Def, etc. +.. $words[-1] = uc($words[-1]); # PQRSTUV my $newstring = join(' ',@words); # back together print "$newstring\n"; __END__ =head1 OUTPUT Abc Def Ghi Jklmno PQRSTUV
-Blake
In reply to Re: Mixing the case of a line
by blakem
in thread Mixing the case of a line
by Joes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |