tie($myvariable, "MyObject"); package MyObject; sub TIEHASH { my ($title)=@_; #prints "$myvariable"; print get_tie_variable(); .... }