QoolKidder
Programmer
Hi Everyone,
First post - so thanks in advance for any help.
I am using the Net::Amazon::ATS (to access Amazon topsites) module and I am having a crazy time trying to figure out how to print the results I get form it. Here is the line that calls it the module:
my $data = $ats->topsites(
Start => 100,
Count => 10,
CountryCode => 'US',
);
From the module an array is return : return \@sites (is returned)
Using Dumper to print the results of $data on the return I get the following:
$VAR1 = [
{
'Country' => {
'ViewsPerMillion' => '1.32',
'ReachPerMillion' => '20',
'Rank' => '49997',
'ViewsPerUser' => '5.4'
},
'Rank' => '1111111',
'Domain' => 'xxx.org'
},
{
'Country' => {
'ViewsPerMillion' => '3.18',
'ReachPerMillion' => '16',
'Rank' => '222222',
'ViewsPerUser' => '17'
},
'Rank' => '22222222',
'Domain' => 'booger.com'
}
];
I am looking for a construct that will help me print this out. I have tried just everything I could think of and have scoured the internet everywhere.
What I current have is:
foreach my $site (@{$data->{Country}}) {
my $domain = $site->{domain};
print "Domain" $domain\n";
}
The error I get is "Pseudo-hashes are deprecated at line XX which is the foreach line.
If anyone can lend some assistance it would be GREATLY appreciated.
Thanks in advance.
C
First post - so thanks in advance for any help.
I am using the Net::Amazon::ATS (to access Amazon topsites) module and I am having a crazy time trying to figure out how to print the results I get form it. Here is the line that calls it the module:
my $data = $ats->topsites(
Start => 100,
Count => 10,
CountryCode => 'US',
);
From the module an array is return : return \@sites (is returned)
Using Dumper to print the results of $data on the return I get the following:
$VAR1 = [
{
'Country' => {
'ViewsPerMillion' => '1.32',
'ReachPerMillion' => '20',
'Rank' => '49997',
'ViewsPerUser' => '5.4'
},
'Rank' => '1111111',
'Domain' => 'xxx.org'
},
{
'Country' => {
'ViewsPerMillion' => '3.18',
'ReachPerMillion' => '16',
'Rank' => '222222',
'ViewsPerUser' => '17'
},
'Rank' => '22222222',
'Domain' => 'booger.com'
}
];
I am looking for a construct that will help me print this out. I have tried just everything I could think of and have scoured the internet everywhere.
What I current have is:
foreach my $site (@{$data->{Country}}) {
my $domain = $site->{domain};
print "Domain" $domain\n";
}
The error I get is "Pseudo-hashes are deprecated at line XX which is the foreach line.
If anyone can lend some assistance it would be GREATLY appreciated.
Thanks in advance.
C