my $rows = []; my $cols = []; my $results = []; my $table = [$rows, $cols, $results]; ...snip... $table->[$row][$col] = @foo;