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 ...
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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |