Help for this page

Select Code to Download


  1. or download this
     sub _is_text {
         my ($content_type) = @_;
    -    return $content_type =~ /(x(?:ht)?ml|text|json|javascript)/;
    +    return $content_type =~ /(\bx(?:ht)?ml\b|text|json|javascript)/;
     }
    
  2. or download this
    my $buffer;
    open my $fh, '>', \$buffer;
    ...
        #content_type => 'application/vnd.ms-excel',
        filename     => 'xxx.xls',
    );