in reply to repeating patterns

Remember that '.' is a special regex character, and if you want to match it specifically, you need to escape it.
@array = ($string =~ m/(a\.foobar)/gso);
(Unless there's more to your question than it appears?)
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain