in reply to Use CGI to run a Perl script via web server
You have mentioned the $sso twice. looks wrong.