use strict; use warnings; use lib '../files/perl/lib'; use Twitter::Objects; my $accounts = Twitter::Objects->accounts; for my $account (@{$accounts}) { print $account; # and other code I want to run through this loop. }