my $text = "hello to all the perl monks"; while ($text =~ /\b([A-Za-z'\-]+ [A-Za-z'\-]+)\b/g) { print "$1\n"; }#while #### hello to to all all the the perl perl monks #### hello to all the perl monks