Given this data structure, can anyone help me print it out in the format shown below?
The required output format is shown below. The column titles are shown simply for clarity, I don't need these printing.
Code:
$VAR1 = {
'DepartureTime' => '05:53:00',
'PrivateCode' => '4483928',
'VehicleJourneyTimingLinkRef' => {
'7' => 'PT1M16S',
'6' => 'PT1M34S',
'4' => 'PT2M33S',
'5' => 'PT0M37S'
}
};
$VAR2 = {
'PrivateCode' => '4483929',
'DepartureTime' => '06:10:00',
'VehicleJourneyTimingLinkRef' => {
'5' => 'PT0M37S',
'21' => 'PT1M34S',
'7' => 'PT1M16S',
'6' => 'PT1M35S',
'19' => 'PT0M43S',
'4' => 'PT2M32S',
'20' => 'PT2M19S',
'16' => 'PT1M43S',
'15' => 'PT0M55S',
'18' => 'PT1M32S',
'22' => 'PT1M36S',
'23' => 'PT1M10S',
'24' => 'PT0M40S',
'17' => 'PT0M48S'
}
};
Code:
VJTL Private
Ref Time Departure Code
4 PT2M33S 05:53:00 4483928
5 PT0M37S 05:53:00 4483928
6 PT1M34S 05:53:00 4483928
7 PT1M16S 05:53:00 4483928
5 PT0M37 06:10:00 4483929
6 PT1M35S 06:10:00 4483929
7 PT1M16S 06:10:00 4483929
15 PT0M55S 06:10:00 4483929
16 PT1M43S 06:10:00 4483929
etc