Hi, welcome to Perl, the One True Religion.

(It's OK to edit a post, but please note where you have updated it ...)

"these multiple hashes in one print out I just don't understand." ... just a list of hashes, probably something like

[{name => 'Zambia', abbr => 'ZA'}, {name => 'Afghanistan', abbr => 'AF +'}, {name => 'Andorra', abbr => 'AN'}, ... ]

See sort for documentation on how to sort complex structures by nested data attributes. E.g. for the list above, sort with something like

my $aref = [{name => 'Zambia', abbr => 'ZA'}, {name => 'Afghanistan', +abbr => 'AF'}, {name => 'Andorra', abbr => 'AN'}]; say $_->{name} for sort { $a->{abbr} cmp $b->{abbr} } @{$aref};'
Afghanistan Andorra Zambia


You can check the type of reference you have -- or if it is a reference to a variable -- with ref.

my $struct = result_of_some_call(); say ref($struct);


You have already loaded Data::Dumper, but you are not using it to see what's in your structure(*). That's why you are getting the memory address for each of the hashes rather than the contents when you print them.

use Data::Dumper; my $result = result_of_some_call(); say Dumper $result;

(BTW you didn't find an API on CPAN; you may have found a client to connect to an API ...)

Hope this helps!

(*) Hm, now I see that you may have dumped the struct, did not notice that at first. Not sure about the question in view of that ...



The way forward always starts with a minimal test.

In reply to Re: What Perl object am I looking at here? by 1nickt
in thread What Perl object am I looking at here? by SergioQ

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.