I don't really understand your description of what you're doing, but you should go and read the Apache::Session docs. They make it pretty clear that you have to make sure the object gets destroyed. Your "print $session{SQLstatement}" will not affect anything one way or the other.