sub myCmp { $a->name() cmp $b->name(); } @tmpArr = ( $obj_1, $obj_2, $obj_3 ); $someObj->myMethod(\&myCmp, @tmpArr);