if ($ENV{HTTP_COOKIE} =~ /sessionid=(\w+)/) { # Call the routine that reads the server-side session info: ($username, %other_session_info) = getsessioninfo($1); }