use strict; use warnings; my $string = "Understand, this string really contains all of the vowels."; my $count; $string =~ /$_/i and $count++ for qw/ a e i o u y /; print "They're all there!\n" if $count == 6;