foreach my $test (@lines) { open my $fh, "<", "$wrestlerdir/$test.total" or die "Can't open @lines.total $!"; my @total = <$fh>; }