in reply to Perl XML parsing with XML::Simple - Having problem with accessing fields
It works just fine for me. Perhaps you're doing someting to disturb your hash before you try to print it?
$ cat t.pl #!/usr/bin/perl use strict; use warnings; my $VAR1; $VAR1 = { 'Data1' => { 'Data2' => { 'DATE' => '2000-10-19', 'ID' => 'A95', 'STATUS' => 'A', 'TIME' => {}, }, 'TIMESTAMP' => '2012-08-04T20:15:04.506-04:00' } }; print $VAR1->{Data1}{Data2}{DATE}, ".\n"; print $VAR1->{Data1}->{Data2}->{DATE}, ".\n"; $ perl t.pl 2000-10-19. 2000-10-19.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|