in reply to how to assign hash element value to scalar?
Can you post your exact code sample, please?
In the snippet you posted:
#all this works: my $xmlsimple = XML::Simple->new(); my $response = $xmlsiple->XMLin($xml_content->content); print "resultid:" . $response->{channel}->{result}->{resultid};
there's clearly a typo; in one place you have $xmlsimple, and another $xmlsiple. I'm guessing maybe the part that "doesn't work" might be the reverse -- a typo which you've inadvertently corrected when you posted.
Try actually cutting and pasting your code (and be sure to use "code tags" (eg. <code> and </code>) around any code examples you submit).
One other suggestion -- put use strict; and use warnings; at the beginning of your program. That may even solve your problem right away!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to assign hash element value to scalar?
by jugdish114 (Initiate) on Nov 14, 2006 at 20:08 UTC |