&get_throughput(\@entry); sub get_throughput { my $entryref; foreach $entryref (@_) { ... if($entryref->[1] == "r") { $sim_time = $entryref->[3]; ...