if ($sid) { $session = new CGI::Session(undef, $sid, {Directory=>'c:/apache/sessions'}); # a bunch of code that grabbed data from the session }