#!/usr/bin/perl use strict; use warnings; my @words qw/......it contain words..../; my @matching = grep /^(?:.*[aeiou]){3}/, @words; print "@matching\n";