Hello! Hope someone can help! I'm having a nightmare navigating an array of hashes. I'm using the Perl Twitter Module - http://search.cpan.org/~cthom/Net-Tw...Net/Twitter.pm . Running this script...
[CODE=perl]#!/usr/bin/perl
use Net::Twitter;
use Data::Dumper;
print "Content-type: text/plain\n\n";
my $twit = Net::Twitter->new(username=> "username", password=>"pass word" );
$result = $twit->replies();
print Dumper($result) ;[/CODE]
I get:
I have no idea how to parse this, I can't even pull any items out. Should by $result even be a scalar? Please please help!
Really appreciate it,
Stuart
[CODE=perl]#!/usr/bin/perl
use Net::Twitter;
use Data::Dumper;
print "Content-type: text/plain\n\n";
my $twit = Net::Twitter->new(username=> "username", password=>"pass word" );
$result = $twit->replies();
print Dumper($result) ;[/CODE]
I get:
Code:
$VAR1 = [
{
'source' => 'web',
'truncated' => bless( do{\(my $o = 0)}, 'JSON::XS::Boolean' ),
'created_at' => 'Thu Feb 21 02:27:32 +0000 2008',
'text' => 'Test Text',
'user' => {
'location' => undef,
'profile_image_url' => 'http://static.twitter.com/images/default_profile_normal.png',
'protected' => $VAR1->[0]{'truncated'},
'name' => 'myname',
'description' => undef,
'url' => undef,
'id' => 123456,
'screen_name' => 'myscreenname'
},
'id' => 123123123
},
{
'source' => 'web',
'truncated' => $VAR1->[0]{'truncated'},
'created_at' => 'Thu Feb 21 01:18:55 +0000 2008',
'text' => 'Test Text',
'user' => {
'location' => undef,
'profile_image_url' => 'http://static.twitter.com/images/default_profile_normal.png',
'protected' => $VAR1->[0]{'truncated'},
'name' => 'myname',
'description' => undef,
'url' => undef,
'id' => 123456,
'screen_name' => 'myscreenname'
},
'id' => 123123123
},
]
Really appreciate it,
Stuart
Comment