my $id=0; if ($cookies{'CGISESSID'}) { $id = $cookies{'CGISESSID'}->value; }