$redi = $responsetextall[$i][$j]{set}{Client}{redirect_uris} # and then... for my $i (0..$#$redi) { $worksheet->write($r, 6, [$redi->[$i]]); }