package Bug; sub print_me { my ($self) = shift; # The @_ array now stores the arguments passed to &Bug::print_me # The rest of &print_me uses the data referred to by $self # and the explicit arguments (still in @_) } or, better still: package Bug; sub print_me { my ($self, @args) = @_; # The @args array now stores the arguments passed to &Bug::print_me # The rest of &print_me uses the data referred to by $self # and the explicit arguments (now in @args) } #### $nextbug = { id => "00001", type => "fatal", descr => "application does not compile", }; To turn that anonymous hash into an object of class Bug you write: bless $nextbug, "Bug";