Explicitly name the content type and status arguments: : Content Type « CGI « Perl






Explicitly name the content type and status arguments:

    

#!/usr/bin/perl
use strict;
use warnings;
use CGI;
my $cgi=new CGI;
print $cgi->header(-type=>'text/html',
                   -status=>'401 Authorization Required',
                   -authname=>'Tom');

   
    
    
    
  








Related examples in the same category

1.Set html header content type
2.Set content type