http://www.perlmonks.org?node_id=1084319

pankaj_it09 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

The above mentioned package requires shared-mime-info database .
I downloaded the database and tried integrating it.
Unable to do so.
How to do that ?

Below is the code -->
use strict; use File::MimeInfo::Magic; use File::Find 'find'; open(FILE,'>>','fileType.csv'); my $inputDirectory = 'F:/'; find({wanted => sub {\&scanFiles();},no_chdir => 1},$inputDirectory); sub scanFiles { my $mimeType = mimetype($File::Find::name); print FILE "$File::Find::name,$mimeType\n"; } close(FILE);
Below is the warning -->

WARNING: You don't seem to have a mime-info database. The shared-mime-info package is available from http://freedesktop.org/