http://qs1969.pair.com?node_id=431455


in reply to Re: Frontier::Client mystery result string hash
in thread Frontier::Client mystery result string hash

This doesn't create a copy, just an alias:

local %hash; *hash = $result->[0]; ... print "Print city: $hash{'city'}\n";
I still can't quite figure out why Frontier::Client put this result in such a pointlessly nested data structure...

Could it possibly return more than one result? Or maybe it's just extending a generic module that returns the data in that fashion.

Replies are listed 'Best First'.
Re^3: Frontier::Client mystery result string hash
by brycen (Monk) on Feb 16, 2005 at 19:50 UTC
    Tricky! Even the camel book harly touches on the * operator, relegating it to 'supported in C' in the index... I settled on the decidedly untricky:
    $geocode = $result->[0]; print "Match: lat=$geocode->{'lat'} long=$geocode->{'long'}\n";
      It's not a operator. It's a variable-type sigil like $, @, % and &. It refers to an entry in the symbol table. While manipulating the symbol table (as I did) is an advanced topic, it is well documented.