You can check whether the parameter is present with defined. the following code
#!/usr/bin/env perl
use strict;
use warnings;
use CGI;
my $cgi = CGI->new();
print $cgi->header;
my $defined = defined $cgi->param('tt');
my $val = $cgi->param('tt');
print <<END;
<!doctype html>
<html> HTML Goes Here
<h1>tt: "$defined" "$val"</h1>
</html>
END
Will generate the output:
<!doctype html>
<html> HTML Goes Here
<h1>tt: "1" ""</h1>
</html>
when the URI is http:///cgi-bin/t.pl?someother=something&tt
Unfortunately this doesn't work when it is the only parameter.
So to be sure, you have to test:
my $defined = defined $cgi->param('tt') || $ENV{QUERY_STRING} eq 'tt';