in reply to Regex help

First, why store the entire file in an array? Why not just iterate one line at a time? Second, you ARE using a global regex, but in scalar context -- it can only return one match at a time. Your regex does more work than needed. You can remove the useless .*?'s in there. And, in this case, you won't end up needing the parentheses in the regex:
open FILE, "< $file" or die "can't read $file: $!"; while (<FILE>) { push @extracted, /foo\d+/g; # just like /(foo\d+)/g }

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;