#!/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