What if you did not know the names of the keys under the parent like the following. This was extracted from data dumper.
$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'
};
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.
Something like
for my $file (sort keys %messagebin) {
#enter into key
$messagebin{$file} then
foreach my $key in the above print out $key = $value
}
Sorry does not make much sense.
|