Hi Toomas,
Both PCs are wheezy (Linux ... 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux)

"file"-versions:
works correctly:     5.11-2+deb7u*1*
doesn't work:         5.11-2+deb7u*2*

Most likely the problem is due to the BEGIN { ...} block which is in the opening of the respective perl-scripts. ( see http://perldoc.perl.org/perlmod.html#BEGIN%2c-UNITCHECK%2c-CHECK%2c-INIT-and-END for explanation)
--------------
#!/usr/bin/perl -w
use strict;

*BEGIN {**
**   if ( !$ENV{'PERL_MODULES'} ) {**
**      $ENV{'PERL_MODULES'}= '/srv/fai/config/perl_modules';**
**   }**
**   unshift @INC, $ENV{'PERL_MODULES'};**
**}*

use FAI;
use NFS::Clients;

....
--------------

When I removed the BEGIN { ...} block, "file" recognizes the script correctly.

I'll try to replace this block and I will make a bug report.

Regards
René


On 03/21/2014 12:27 PM, Toomas Tamm wrote:
Hello,

(1) I can not reproduce this. What is your exact version of "file"
according to dpkg? Mine is 5.11-2+deb7u2  (my Debian is wheezy).

$ cat test
#!/usr/bin/perl -w
print "Hello World\n";
$ file test
test: Perl script, ASCII text executable

(2) Could it be something specific in your script? Try deleting parts of
the script (in a copy, of course) and see if "file" starts detecting
correctly after some specific part of the script is gone.

If you can show what exactly causes it, you may file a bug against
"file" in Debian BTS.

Toomas

On Fri, 2014-03-21 at 12:06 +0100, René Bleisch wrote:
Hi,
Apparently, something went amiss with the linux "file" command since
it was last updated in apt... (last week or so)

Antwort per Email an