use strict; use warnings; use Data::Dumper; while() { my @array = $_ =~ m/\b([A-Z]+)\b/g; print "@array\n"; } __DATA__ BROUGHTON VETERINARY GROUP. Leicestershire mixed practice seeks experienced vet to replace assistant relocating to Scotland GIRLING AND BOWDITCH VETERINARY SURGEONS We are looking for an experienced vet for our 5 vet mixed practice. STANHOPE PARK VETERINARY HOSPITAL. Due to a pregnancy epidemic we are looking for 2 new vets, 100% small animal hospital in County Durham.