Search notes:

Perl module File::LibMagic

#!/usr/bin/perl
use warnings;
use strict;

use File::LibMagic;

use File::Spec;
use Cwd;

my $lm = File::LibMagic->new;

print $lm -> describe_filename ($0         ), "\n"; # a /usr/bin/perl script, ASCII text executable
print $lm -> describe_filename ('README.md'), "\n"; # ASCII text
Github repository PerlModules, path: /File/LibMagic/script.pl

Installing lib magic

The module needs lib magic.
It can be installed with apt-get
sudo apt-get install libmagic-dev
or yum
yum -y install file-devel

See also

Perl module File::Type
Perl modules.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759391079, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/File/LibMagic/index(65): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78