There is another way for Data::Dumper to display the results and that is by simply turning on the Useqq flag like this $Data::Dumper::Useqq = 1;, though it is not recommended. This way you'll get double quotes instead of single quotes.

As a side note, I don't know what you are trying to do with your code, but you may get into trouble if you try to get two books published on the same date. If that happens, from your code, the first book retrieved will get overwritten and you won't know it was ever there. My advice to overcome that situation is to make, for each date, an array of hash references with the other book properties.

Something like

if ($response->is_success()) { for my $prop ($response->properties) { my %info; $info{'title'} = $prop->title(); $info{'authors'} = join(", ",$prop->authors()); $info{'isbn'} = $prop->isbn(); $info{'pages'} = $prop->numpages(); $info{'publisher'} = $prop->publisher(); $info{'image_small'} = $prop->ImageUrlSmall(); $info{'image_medium'} = $prop->ImageUrlMedium(); push $books{$prop->publication_date()}, \%info; } print Dumper \%books; }

In reply to Re^3: Hash of Hashes by olus
in thread Hash of Hashes by ewhitt

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.