in reply to Perl DSC and or XML::Simple

I haven't tested this but it should work.
my $refdata = XMLin('C:/myxmltest.xml'); foreach my $href ( @$refdata->{'Map'} ){ print $href->{'MapId'} ."\n"; }

Update: I should explain. You forgot the @. $refdata->{'Map'} is an array reference so you make it @$refdata->{'Map'} and you can act on all of the values that the array reference references.

2nd Update: I forgot the curly braces. Doh!

Replies are listed 'Best First'.
Re: Re: Perl DSC and or XML::Simple
by Anonymous Monk on Sep 01, 2002 at 11:44 UTC
    I Had tried that previously and got a different error, something about "Not an ARRAYin line xxxx" I forgot about using those Dang {} curly braces.. The correct line reads....  foreach my $href ( @{$refdata->{'Map'} } ) { Thanks for your help else i probably wouldn't have tried it that way again, Dan.