sub myfunction{ my($object1,$object2)=@_; print $object1->to_string(); print $object2->to_string(); }