c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le "my $str = 'mary had a little lamb'; ;; my $word = qr{ [[:alpha:]]+ }xms; ;; my @words = ($str =~ m{ $word }xmsg)[0 .. 2]; dd \@words; " ["mary", "had", "a"]