Help for this page
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)/; }
my $buffer; open my $fh, '>', \$buffer; ... #content_type => 'application/vnd.ms-excel', filename => 'xxx.xls', );