in reply to some help w/ hashes

Note that allPrices is a reference to an array and ought be handled as a special case.

use strict; use warnings; my $itemHash = { '14260:771:0' => { 'allPrices' => [ 8900, 22000 ], 'itemMetrics' => '2:2:20100:0:0:2:30900', 'bidCount' => '0', 'minPrice' => '20100', 'itemClass' => '2', 'buyPrice' => '30900', 'buyCount' => '2', 'numCount' => '2', 'minCount' => '2', 'itemName' => 'Bloodwoven Bracers of the Owl', 'itemPrices' => '8900:22000', 'bidPrice' => '0', 'randomID' => '771', 'baseNum' => '14260', 'mean' => '400', 'median' => '300', 'mode' => '400', 'stdDev' => '100', }, }; for my $RealmFaction (keys %$itemHash) { for my $item (keys %{$itemHash->{$RealmFaction}}) { print "$item => $itemHash->{$RealmFaction}{$item}\n"; } }

Prints:

stdDev => 100 mode => 400 itemMetrics => 2:2:20100:0:0:2:30900 median => 300 minPrice => 20100 minCount => 2 itemPrices => 8900:22000 randomID => 771 baseNum => 14260 allPrices => ARRAY(0x1f125f4) bidCount => 0 mean => 400 itemClass => 2 numCount => 2 buyCount => 2 buyPrice => 30900 itemName => Bloodwoven Bracers of the Owl bidPrice => 0

DWIM is Perl's answer to Gödel