in reply to -T changed behavior

For those wondering here the docs: -T

• -T File is an ASCII or UTF-8 text file (heuristic guess).

• -B File is a "binary" file (opposite of -T).

...

The -T and -B tests work as follows. The first block or so of the file is examined to see if it is valid UTF-8 that includes non-ASCII characters. If so, it's a -T file. Otherwise, that same portion of the file is examined for odd characters such as strange control codes or characters with the high bit set. If more than a third of the characters are strange, it's a -B file; otherwise it's a -T file. Also, any file containing a zero byte in the examined portion is considered a binary file. (If executed within the scope of a use locale which includesLC_CTYPE , odd characters are anything that isn't a printable nor space in the current locale. ) If -T or -B is used on a filehandle, the current IO buffer is examined rather than the first block. Both -T and -B return true on an empty file, or a file at EOF when testing a filehandle. Because you have to read a file to do the -T test, on most occasions you want to use a -f against the file first, as in next unless -f $file && -T $file .

Consequently I would check if the new Perl installation has another locale setting.

Like others said, give us an example input to reproduce the problem.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery