while (my ($match) = m/$regex/g) { $matched{$match} = 1; print "$file $_"; }