Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Frontier::Client mystery result string hash

by ikegami (Patriarch)
on Feb 16, 2005 at 06:46 UTC ( [id://431455]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://431455]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-24 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found