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

Re: Frontier::Client mystery result string hash

by Tanktalus (Canon)
on Feb 16, 2005 at 04:54 UTC ( #431437=note: print w/replies, xml ) Need Help??

in reply to Frontier::Client mystery result string hash

That doesn't look quite right. First off, are you doing:

print Dumper($result)
print Dumper([$result])
? If you're doing the former, that means $result is an array ref. The array so ref'd has one entry in it: a hash ref. That hash has a bunch of keys, including state, suffix, lat, and city. That is option #1. If you're doing the latter, then $result is a hash ref. This is option #2.

In option #1, you would find the city via: $result->[0]->{'city'} or, my preference, $result->[0]{'city'} (the quotes are optional in both cases).

In option #2, you would find the city as you attempted.

Either way, I'm not sure that your error is coming from the print statement. Can you come up with a minimal working script that shows your problem? You can skip Frontier::Client, if the problem isn't there, by setting up $result in your minimal script.


Replies are listed 'Best First'.
Re: Frontier::Client mystery result string hash
by brycen (Monk) on Feb 16, 2005 at 05:28 UTC
    Thanks. I did indeed use the plain print Dumper($result) as I had specified.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2022-05-21 10:21 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (76 votes). Check out past polls.