in reply to Knowing the scheme
my $q = CGI->new; unless ($q->https) { # I'm not running under SSL } [download]
Hope this helps...
gav^