sub beautify { my ($in) = @_; my $tmp; foreach (split(/\s/o, lc($in))){ $tmp .= ucfirst($_); $tmp .= ' '; } $tmp =~ s/\s$//; return($tmp); } #### use util; use Test::More tests => 34; is( &util::beautify( "àisTheWord"), "Àistheword", "àisTheWord - special character changes case." ); ... is( &util::beautify( "ùisTheWord"), "Ùistheword", "ùisTheWord - special character changes case." ); is( &util::beautify( "ûisTheWord"), "Ûistheword", "ûisTheWord - special character changes case." ); is( &util::beautify( "üisTheWord"), "Üistheword", "üisTheWord - special character changes case." ); is( &util::beautify( "ÿisTheWord"), "Ÿisthejword", "ÿisTheWord - special character changes case." ); ... #### use utf8; use Encode;