I am trying to create the meta tag:

<META HTTP-EQUIV="Pragma" CONTENT="no cache">

I tried the following line:

print $cgi->start_html(-title => 'Meta Test', -meta=> { 'HTTP-EQUIV'=>'Pragma', 'CONTENT'=>'no cache'}), "\n";

But I get this:

<meta name="HTTP-EQUIV" content="Pragma" /> 
<meta name="CONTENT" content="no cache" />

Can someone tell me how to create the right tag using CGI?

Ok, I got it to work:

print $cgi->start_html(-title => 'Siddharth\'s Search Engine', -head => "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no cache\" />"), "\n";

Although, I would still like it more if there was a better way to do it.

Ok, I got it to work:

print $cgi->start_html(-title => 'Siddharth\'s Search Engine', -head => "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no cache\" />"), "\n";

Although, I would still like it more if there was a better way to do it.

Its covered in the CGI modules documentation, you were pretty close actually:

use CGI;
my $cgi = CGI->new;
print $cgi->start_html(-title => 'Meta Test',
                       -head=>$cgi->meta({-http_equiv => 'Pragma',
                                          -content    => 'no-cache'}));
This question has already been answered. Start a new discussion instead.