Jim and David, > m/^[aeiouy]+$/i
I tried your suggestions but it still gives the same result: my $string = 'Off The Menu'; my @words = split(/ /, $string); my @new_words; foreach my $word (@words) { if ((length $word >= 3 and length $word <= 4) and ! ($word =~ m/^[aeiouy]+$/i or $word =~ m/^[bcdfghjklmnpqrstvwxz]+$/i)) { $word = uc($word); } push @new_words, $word; } $string = "@new_words"; print $string . "\n"; gives me "OFF THE MENU". -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/