So the parent keys are just numbers like 1.2.3.4.4.5.5 and i have a counter which holds how many keys are in the %messagebin hash, so what i want to be able to do is sort and process each key under the parent with the value.$VAR1 = '4'; $VAR2 = { '' => '', '35' => 'D', '11' => '3104052', '63' => '0', '167' => 'FUT', '200' => '200512', '1' => '2', '44' => '112.55', '55' => 'XEURFGBM0F2005Z', '50' => 'portwaretrader1', '40' => '2', '57' => 'RISKGATEWAY', '15' => 'USD', '38' => '1', '52' => '20051118-07:31:46', '59' => '0', '60' => '20051118-07:31:40', '34' => '37', '56' => 'EXLINK_CAMPBELL', '49' => 'CAMPBELL_EXLINK', '10' => '170', '54' => '1' };
Sorry does not make much sense.for my $file (sort keys %messagebin) { #enter into key $messagebin{$file} then foreach my $key in the above print out $key = $value }
In reply to Re^2: Looping through hash of hashes
by minixman
in thread Looping through hash of hashes
by minixman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |