sub getheader { my $query = new CGI; my $hdr = $query->header(); $_ = $query->start_html( -title=>$_[0], -meta=>{ 'description'=>'Test', 'keywords'=>'test', 'rating'=>'general', 'robots'=>'all' }, -head=>[ meta({ -http_equiv=>'content-language', -content=>'en-gb@' }), meta({ -http_equiv=>'content-type', -content=>'text/html; charset=iso-8859-1@' })], -style=>{ -src=>'/atlantia.css', -media=>'screen', -charset=>'utf-8' }, -dtd=>'-//W3C//DTD XHTML 1.1 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd', -script=>{ -src=>'/sort.js' }, -onLoad=> defined($_[1]) ? "document.$_[1].focus()" : '', ); #----remove xml prologue from before doctype to prevent windows 'quirk mode' s/\n//; $_ = $'; #----remove invalid language tag s/language=\"JavaScript\"//; #----replace invalid tag end > with /> for meta http-equiv s/@\">\n/\" \/>\n/g; return $hdr.$_; }