Firefox can’t establish a connection to the server at localhost

Dear Perl Programmers!
I created this script and run. But there is an error arises "Firefox can't establish a connection to the server at localhost". Is there any technical problem???
Unable to connect
Firefox can't establish a connection to the server at localhost.
#!C:Perlbinperl
$start = $ENV{'HTTP_REFERER'};
$this_server = "http://localhost/";
print "Content-type:text/htmlnn </html>";
if ($start = ~m/$this_server/i)
{
print "<b>OK: </b>Script accessed from this serverr."}
Else
{
print "<b>Unauthorized Access : </b><br>";
print "Script cannot run from that location!"
}
print "</html>";
