Just a quick question, how can I "convert" a JSON string to a hash so I can reference it as $hashname{keyname} instead of having to use $hashname->{keyname} for consistancy in my program? I use "map" to split the query string:
sub QueryData {
$QD_In = $_[0];
@QD_Pair = split('&',$QD_In);
%QD_Out = map{split('=',$_,2)} @QD_Pair;
return (%QD_Out);
}
I'm thinking there is a way using "map" to fix the JSON string, but I can't find any references to that affect on the internet. I'm going to continue searching here in hopes that someone knows an answer. Thanx again, you guys are always a bunch of help...
-Gary
I tried re-inventing the wheel again, but everytime I push it, it still falls flat on it's side...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.