in reply to Re^2: Joining array into new string
in thread Joining array into new string
To be fair to poj, The question he originally asked is "how can I" not "why doesn't it work?"
For the benefit of others: The OP created an outer anonymous array containing two other inner anonymous arrays by using the square brackets. From the @groups array perspective, it only contains a single element, the outer anonymous array. It doesn't "see" the other anonymous arrays inside of it. When you try to join on an array with a single element, you just get the single element returned because there's nothing really to join. The ARRAY(0x...) you see is the string that perl spits out when you print an anonymous array. It represents the location of the array in the computer's memory (I think Perl's virtual machine's memory, to be more precise).
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
|
|---|