http://qs321.pair.com?node_id=11124981


in reply to Re^3: Printing first element of an array in worksheet
in thread Printing first element of an array in worksheet

I am receiving all the elements from $responsetextall$i$j{set}{Client}{redirect_uris}; which was ARRAY of ARRAY references

$responsetextall[$i][$j]{set}{Client}{redirect_uris};

The issue is its not writing all the elements in single cell of a worksheet and its writing in separate cells. like the following 'http://abcd01.cpu.comp.com:80/AutosysPortal/' 'http://abcd01.cpu.comp.com:80/Da/', 'http://abcd01.cpu.comp.com:80/Ge/', 'http://abcd01.cpu.comp.com:80/PO/', 'http://abcd01.cpu.comp.com:80/g Can we split through "|" and put it into single cell?

Replies are listed 'Best First'.
Re^5: Printing first element of an array in worksheet
by choroba (Cardinal) on Dec 11, 2020 at 11:13 UTC
    You probably mean join, not split, it's the inverse. Yes, you can:
    my $string = join '|', @{ $responsetextall[$i][$j]{set}{Client}{redire +ct_uris} };
    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

      Thanks this works