in reply to Re^2: Help on foreach loop
in thread Help on foreach loop

Sounds like $ARGV isn't changing, possibly because the file isn't closed? Try closing ARGV within the while loop:
@ARGV = <$responseDir/*>; while (<>) { $newFile = $ARGV, close ARGV, last if /^"$commonField"$/; }

Caution: Contents may have been coded under pressure.