in reply to Not an array reference Twitter API
$results isn't a reference to an array, so you can't loop through it. According to the Net::Twitter documentation, it's a reference to a hash. This hash has a key "results", the value of which is an array ref, so you can loop through it.
You probably want something like...
foreach my $tweet ( @{$results->{results}} ) { printf( "%s <%s> %s\n", $tweet->{created_at}, $tweet->{from_user}, $tweet->{text}, ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Not an array reference Twitter API
by neelakash21 (Initiate) on Sep 13, 2012 at 21:21 UTC |