$y = $session{x}; # $session{x} is an object $y->set_z(3); # this changes the state of object $y