If what you want is to end up with a histogram-like structure, stuff the found vowels into a hash. You may try something like this:
my $phrase = 'There once was a doggy in the window. I went into the st +ore and inquired about the price, the doggy was too nice to ever thin +k twice, so now I have a doggy to care for.'; my %vowels; while ($phrase =~ /([aeiou])/gi) { $vowels{lc $1}++; } use YAML; print Dump \%vowels; __END__ the output would look like --- a: 8 e: 17 i: 11 o: 15 u: 2
In reply to Re: Get Vowels from sentence
by ferreira
in thread Get Vowels from sentence
by tiny_tim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |