I have been recently working on some code that processes data returned from a third party function to generate reports. I wanted to make sure that the data I have been reciving is correct and so have used Data::Dumper to print it so I can check. My problem however is that whilst running the following call to show me the whole object returned:-
print Data::Dumper->Dump([$sb]);
produces
$VAR1 = bless( [
'100',
[
[
'2593140',
'2766860',
'0',
undef,
undef,
undef,
undef,
'0UI38923424239K',
'2002-01-10 09:16:50',
'1500',
'None Given',
'£',
'GBP'
],
[
'2513902',
'2766861',
'1',
undef,
undef,
undef,
undef,
'LKJS3892342423Y5S',
'2002-01-10 09:16:54',
'1500',
'None Given',
'£',
'GBP'
],
[
'2574165',
'2766862',
'0',
undef,
undef,
undef,
undef,
'0ASJH2782121S',
'2002-01-10 09:16:57',
'1500',
'None Given',
'£',
'GBP'
],
........etc
when I try and just display the subset of that data (ie just the bit that actualy interests me :-
print Data::Dumper->Dump($sb->[1]);
all I get is
$VAR1 = [
'2593140',
'2766860',
'0',
undef,
undef,
undef,
undef,
'0UI38923424239K',
'2002-01-10 09:16:50',
'1500',
'None Given',
'£',
'GBP'
];
ie I dont seem to be able to access all the rest.
On top of that if I go
print Data::Dumper->Dump($sb->[1]->[$anumber]);
where $anumber is 1,2,3,4 etc I get the first element of each of the successive arrays from the original
Its not been a huge problem as dumping the entire object showed me that all the data was indeed there. But I would like to know why Data::Dumper didn't produce the results I was expecting. Any ideas?
---If it doesn't fit use a bigger hammer