1 2 3 4 5 6 7 8
... my $key = "allItems"; while (my($itemNum, $itemTitle) = $dbh->fetchrow_array()) { push(@aItems, { 'itemNum' => $itemNum, 'itemName' => $itemTitle }); }
$item{$key}{'itemList'} = \@aItems;
1 2 3
$item{$key}{'debugArray'} = join ("|", @auctionItems); while( my @array=each($item{$key}{'itemList'} )) { $item{$key}{'debugHash'} = $item{$key}{'debugHash'} ."|$array[0] -> $array[1]"; $array[0]=undef;$array[1]=undef } }
Quote'debugHash' => '|0 -> |1 -> HASH(0x24981a0)|2 -> HASH(0x2497be8)|3 -> HASH(0x249def0)|4 -> HASH(0x1d23188)|5 -> HASH(0x24982f0)|6 -> HASH(0x24983c8)',
'debugArray' => '|HASH(0x24981a0)|HASH(0x2497be8)|HASH(0x249def0)|HASH(0x1d23188)|HASH(0x24982f0)|HASH(0x24983c8)'
$item{$key}{'debugArray'} = join ("|", @auctionItems);
'debugArray' => '|HASH(0x24981a0)|HASH(0x2497be8)|HASH(0x249def0)|HASH(0x1d23188)|HASH(0x24982f0)|HASH(0x24983c8)'
1 2 3
join( '|', 1,2,3 ); # produces "1|2|3" join( '|', "",4,5 ); # produces "|4|5" join( '|', undef,6,7 ); # produces "|6|7"; giving warning if enabled
@aItems = undef;