in reply to $_ getting clobbered by inner loop.

Unfortunately, that's just the way it is. You are better off using a lexical variable for (at least) the outer loop:
for my $file (@test_files) { # use $file here while (<TEST_FILE>) { # use $_ here } }
The default loop variable $_ is only meant to be used for small code fragments. For anything more complicated you should use a named lexical.

Update: Your example does illustrate the difference between for loops and while loops. In the following nested loops, $_ does not get clobbered:

for (1..3) { print "_ before = $_\n"; for ('a'..'c') { print "_ inner loop = $_\n"; } print "_ after = $_\n"; # prints same as before inner loop }