my @bits = /(f.o)(b.r)(b.z)/; foreach (@bits) { print "$_\n"; }