my $count; $count = 0; while ($count >= 0) { $tableattribute_ref=$sforce->describeGlobal()->result->{sobjects}[$count]{name}; #This is where I can push names to an array $count++; }