my $content = get(...); my @accum = ( undef, (\%normals) x 5, \%powers ); for ( split /\n/, $content ) { my @data = split; $accum[$_]{$data[$_]}++ for 1 .. 6; }