I am having difficulty accessing the lowest elements of this data structure:
I would like to print out the 'RemaingCost' values (0 and 5). This does not work:
That just returns 'Not a HASH reference'. Can anyone point me in the right direction?
Code:
$VAR1 = {
'MoveCompletedEndsBack' => '0',
'NewTasksEstimated' => '1',
'Resources' => {
'Resource' => [
{
'RemainingCost' => '0',
'UID' => '0',
'PeakUnits' => '0.00',
'ACWP' => '0.00',
'Type' => '1',
'CreationDate' => '2011-01-19T09:06:00',
'CV' => '0.00',
'OvertimeRate' => '0',
'BCWS' => '0.00',
'StandardRate' => '0',
},
{
'RemainingCost' => '5',
'UID' => '1',
'PeakUnits' => '3.00',
'ACWP' => '0.00',
'Type' => '1',
'CreationDate' => '2011-01-19T09:06:00',
'CV' => '0.00',
'OvertimeRate' => '0',
'BCWS' => '0.00',
'StandardRate' => '0',
},
]
},
'DefaultFinishTime' => '17:00:00',
'DefaultStartTime' => '08:00:00',
'CreationDate' => '2009-11-17T11:25:00',
'FiscalYearStart' => '0',
'WeekStartDay' => '1',
'NewTasksAreManual' => '0',
'MinutesPerDay' => '480'
};
I would like to print out the 'RemaingCost' values (0 and 5). This does not work:
Code:
print "$tree->{Resources}->{Resource}->{RemainingCost}\n";
That just returns 'Not a HASH reference'. Can anyone point me in the right direction?