tej has asked for the wisdom of the Perl Monks concerning the following question:

I am working with a multidimentional array and i want to convert them in string.

Please help me how can i join all elements of array. to string. I tried using join the way we normaly use for simple array, but no go. Please help.

Thank you.

Replies are listed 'Best First'.
Re: Join for multidimentional array
by suhailck (Friar) on Sep 28, 2010 at 09:39 UTC
    Does this suit your requirement?
    perl -le 'my @array=([a,b,c,d],[1,2,3,4]);print join "|",map {@$_} @ar +ray' a|b|c|d|1|2|3|4
Re: Join for multidimentional array
by JavaFan (Canon) on Sep 28, 2010 at 10:45 UTC
    my $_ = [[[0, 1], [2, 3]], [[4, 5], [6, 7]], 8, [9, ["A", "B"]]]; sub sj (_); sub sj (_) {join "-", map {ref() ? sj : $_} @{$_[0]}} say sj; __END__ 0-1-2-3-4-5-6-7-8-9-A-B