dataDrone has asked for the wisdom of the Perl Monks concerning the following question:
I get a Argument "VC3NEDX$" isn't numeric in hash element at E:\code\xmltest2.pl line 23. Bad index while coercing array into hash at E:\code\xmltest2.pl line 23. Although 'VC3NEDX$' is exactly what i want to print out and is indeed available in $refdata->{'Map'}[0]->{'MapId'} Me thinks i need a little Smack, Up-side the head. Thanks, Dan.my $refdata = XMLin('C:/myxmltest.xml'); print ref($refdata) . "\n"; # Prints out HASH print ref($refdata->{'Map'}) ."\n"; # Prints out ARRAY print ref($refdata->{'Map'}[0]) . "\n"; # Prints out HASH # But when I try ... foreach my $href ( $refdata->{'Map'} ){ print $href->{'MapId'} ."\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl DSC and or XML::Simple
by Mr. Muskrat (Canon) on Aug 31, 2002 at 21:03 UTC | |
by Anonymous Monk on Sep 01, 2002 at 11:44 UTC | |
|
Re: Perl DSC and or XML::Simple
by grantm (Parson) on Sep 01, 2002 at 23:56 UTC | |
by dataDrone (Acolyte) on Sep 05, 2002 at 00:06 UTC |