$.
is not actually a global variable, it is an attribute of the most recently read filehandle. And you are using a new filehandle in each iteration through the loop.
Modifying your code like so "fixes" it:
my $fh;
for my $file (@files){
open $fh, '<', $file;