File::Extension - explain file extensions
use File::Extension qw(extplain); my @filetypes = qw(nes pl pm gb p6); for my $what(@filetypes) { printf("%s is a %s\n", $what, extplain($what)); }
File::Extension exposes functionality for getting information on filetypes based solely on their file extension.
This is useful in cases where libmagic doesn't work, i.e on empty or corrupted files.
The extensions and descriptions are taken from http://fileinfo.com.
None by default.
Parameters: $file_extension
Returns: $explanation
my $explanation = extplain('nes'); # Nintendo (NES) ROM File
This module was initially crafted while exploring ideas for generating the world's largest LS_COLORS file:
"https://github.com/trapd00r/LS_COLORS/issues/112"
https://github.com/trapd00r/LS_COLORS
Magnus Woldrich CPAN ID: WOLDRICH m@japh.se http://japh.se
None required yet.
Copyright 2018 the File::Extensions "AUTHOR" and "CONTRIBUTORS" as listed above.
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
To install File::Extension, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Extension
CPAN shell
perl -MCPAN -e shell install File::Extension
For more information on module installation, please visit the detailed CPAN module installation guide.