in reply to how to assign hash element value to scalar?

Hi jugdish114,

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!


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

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
    yes, those were simple errors when i was typing the code into the webform. the code runs, and does not use '$xmlsiple' anywhere.

    so...

    any ideas why i can't move the value of this hash element into a simple scalar? i'm guessing i have to do somehting like cast the hash as an array or string or something.

    thanks.