Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by ikegami (Patriarch)
on Feb 16, 2005 at 06:46 UTC ( #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? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2022-05-25 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (90 votes). Check out past polls.

    Notices?