use MIME::Types; my $mimetypes = MIME::Types->new; my MIME::Type $plaintext = $mimetypes->type('text/plain'); my MIME::Type $imagegif = $mimetypes->mimeTypeOf('gif');
MIME types are used in MIME compliant lines, for instance as part of e-mail and HTTP traffic, to indicate the type of content which is transmitted. Sometimes real knowledge about a mime-type is need.
This module maintains a set of MIME::Type objects, which each describe one known mime type. There are many types defined by RFCs and vendors, so the list is long but not complete. Please don't hestitate to ask to add additional information.
If you wish to get access to the mime.types
files, which are
available on various places in UNIX and Linux systems, then have a
look at File::TypeInfo.