use HTTP::Headers::Util qw(split_header_words); @values = split_header_words($h->header("Content-Type"));
The following functions are provided:
This is easier to describe with an example:
split_header_words('foo="bar"; port="80,81"; discard, bar=baz') split_header_words('text/html; charset="iso-8859-1");will return
[foo=>'bar', port=>'80,81', discard=> undef], [bar=>'baz' ] ['text/html' => undef, charset => 'iso-8859-1']
join_header_words(["text/plain" => undef, charset => "iso-8859/1"]);
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.