foreach my $obj (@ArrayofObjects){ $obj->print } #### foreach my $obj (sort @ArObj[$a]->price <=> @ArObj[$b]->price} @ArObj) { # stuff here ... }