in reply to how to pass object to a subroutine

You don't show your constructor, but I guess that your are using bless on a reference to a hash. Therefore the print is correct, you are printing an object, which is a blessed reference to a hash. What is it that the subroutines expect as their argument? If a string then overload the " operator as described above, or maybe you should be using select to override the default output handle?