>>>>> "M" == Marc <sono...@fannullone.us> writes:
M> Jim and David, >> m/^[aeiouy]+$/i M> I tried your suggestions but it still gives the same result: M> my $string = 'Off The Menu'; M> my @words = split(/ /, $string); M> my @new_words; M> foreach my $word (@words) { M> if ((length $word >= 3 and length $word <= 4) and ! ($word =~ m/^[aeiouy]+$/i or $word =~ m/^[bcdfghjklmnpqrstvwxz]+$/i)) { your boolean logic is wrong. you want to get rid of the ! in there. you upper case if the word size is right AND it has all vowels or all consonants. your negation makes it do this for regular words (mixed vowel/consonant) of the right size uri -- Uri Guttman -- uri AT perlhunter DOT com --- http://www.perlhunter.com -- ------------ Perl Developer Recruiting and Placement Services ------------- ----- Perl Code Review, Architecture, Development, Training, Support ------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/