SPUG: xml parsing
DeRykus, Charles E
charles.e.derykus at boeing.com
Wed Oct 4 10:30:19 PDT 2006
>my $isbn=$$item{'book:isbn'};
>and returns empty but if I do it like this :
>my $isbn=$$item{book:isbn};
That should be:
My $isbn = ${$item{book:isbn}};
Here's some clarification from 'perldoc perldsc':
The seemingly equivalent construct in Perl, $$aref[$i] first
does the deref of $aref, making it take $aref as a reference
to an array, and then dereference that, and finally tell you
the i'th value of the array pointed to by $AoA. If you
wanted the C notion, you'd have to write "${$AoA[$i]}" to
force the $AoA[$i] to get evaluated first before the leading
"$" dereferencer.
...
--
Charles DeRykus
________________________________________________
Seattle Perl Users Group Mailing List
POST TO: spug-list at pm.org
SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
MEETINGS: 3rd Tuesdays
WEB PAGE: http://seattleperl.org/
More information about the spug-list
mailing list