for my $filename (@files) { my %data1; # do all processing of file $filename here }