in reply to Re: unable to store shared hash with Storable
in thread unable to store shared hash with Storable
JSON's encode() function would create a UTF8 text string out of the shared hash, so I just decoded() it back into an (unshared) HREF, and then I just stored that.
or I could just slap it all into one statement:my $encoded = JSON::XS->new->utf8->encode( $HREF ); my $decoded = JSON::XS->new->utf8->decode( $encoded ); store $decoded, $filename1;
and all is well in the universe again!store(JSON::XS->new->utf8->decode( JSON::XS->new->utf8->encode( $HREF ) ), $filename1);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: unable to store shared hash with Storable
by ikegami (Patriarch) on Aug 11, 2011 at 02:12 UTC |