in reply to Re^4: How to improve introspection of an array of hashes
in thread How to improve introspection of an array of hashes

I modified the code slightly to get rid of the "SCALAR" output.
I should have thought of that xD.

What did you use for the output, I'm guessing it's not Data::Dump? "author" => {} would normally not have the quotes, and I don't understand how you can get something like "\\$t", where the backslash is escaped, so $t gets interpolated which would normally not happen with a either Data::Dumper or Data::Dump.

  • Comment on Re^5: How to improve introspection of an array of hashes

Replies are listed 'Best First'.
Re^6: How to improve introspection of an array of hashes
by nysus (Parson) on Sep 13, 2018 at 20:24 UTC
    Ah, sorry, yeah. That those double backslashes were an artifact of my logging script which uses Dumper. I'll have to look into replacing that with pp. Anyway, here is the raw output from pp:
    HASH => { encoding => {}, feed => { HASH => { "author" => { ARRAY => { HASH => { email => { HASH => { "\$t" => {} } }, name => { HASH => { "\$t" => {} } }, }, }, }, "category" => { ARRAY => { HASH => { scheme => {}, term => {} +} } }, "entry" => { ARRAY => { HASH => { "app\$edited" => { HASH => { "\$t" => {}, "xmlns\$app" = +> {} } }, "category" => { ARRAY => { HASH => { scheme => {}, term +=> {} } } }, "content" => { HASH => { "\$t" => {} } }, "gContact\$groupMembershipInfo" => { ARRAY => { HASH => +{ deleted => {}, href => {} } } }, "gContact\$userDefinedField" => { ARRAY => { HASH => { k +ey => {}, value => {} } } }, "gd\$email" => { ARRAY => { HASH => { address => {}, primary => {}, rel + => {} } }, }, "gd\$etag" => {}, "gd\$extendedProperty" => { ARRAY => { HASH => { "\$t" = +> {}, "name" => {} } } }, "gd\$name" => { HASH => { "gd\$familyName" => { HASH => { "\$t" => {} } }, "gd\$fullName" => { HASH => { "\$t" => {} } }, "gd\$givenName" => { HASH => { "\$t" => {} } }, }, }, "gd\$phoneNumber" => { ARRAY => { HASH => { "\$t" => {}, "primary" => {}, "rel" => {}, + "uri" => {} }, }, }, "id" => { HASH => { "\$t" => {} } }, "link" => { ARRAY => { HASH => { "gd\$etag" => {}, "href" => {}, "rel" => { +}, "type" => {} }, }, }, "title" => { HASH => { "\$t" => {} } }, "updated" => { HASH => { "\$t" => {} } }, }, }, }, "gd\$etag" => {}, "generator" => { HASH => { "\$t" => {}, "uri" => {}, "version" + => {} } }, "id" => { HASH => { "\$t" => {} } }, "link" => { ARRAY => { HASH => { href => {}, rel => {}, type = +> {} } } }, "openSearch\$itemsPerPage" => { HASH => { "\$t" => {} } }, "openSearch\$startIndex" => { HASH => { "\$t" => {} } }, "openSearch\$totalResults" => { HASH => { "\$t" => {} } }, "title" => { HASH => { "\$t" => {} } }, "updated" => { HASH => { "\$t" => {} } }, "xmlns" => {}, "xmlns\$batch" => {}, "xmlns\$gContact" => {}, "xmlns\$gd" => {}, "xmlns\$openSearch" => {}, }, }, version => {}, },

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

      By the way, do you have an idea on what the significance of the dollar sign in a json key is? I've never seen that before. I googled a bit but didn't find anything definitive about it.

      $PM = "Perl Monk's";
      $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
      $nysus = $PM . ' ' . $MCF;
      Click here if you love Perl Monks

        JSON just describes a way to represent your data, not what it can contain. So the dollar signs just have a special meaning in the application where you took that data.

Re^6: How to improve introspection of an array of hashes
by nysus (Parson) on Sep 14, 2018 at 00:07 UTC