Nope, I'm not exactly sure if I understand what you are asking, but here's my best guess...
Consider the following code and result
foreach ("abc123", "xyz123","def12","ghi123") {
/(.*)123/;
print "scanning $_: found $1\n";
}
__DATA__
scanning abc123: found abc
scanning xyz123: found xyz
scanning def12: found xyz
scanning ghi123: found ghi
<code>
Notice that while scanning "<code>def12