develooper Front page | perl.perl5.porters | Postings from May 2014

Re: RFC: Making -B and -T work better on 8-bit encodings

Thread Previous | Thread Next
Ævar Arnfjörð Bjarmason
May 6, 2014 20:04
Re: RFC: Making -B and -T work better on 8-bit encodings
Message ID:
On Fri, May 2, 2014 at 10:28 PM, Karl Williamson
<> wrote:
> The -B and -T file test operators don't really work well for non-ASCII text
> files, except perhaps under 'use locale'

How does the old functionality and the proposed new functionality
compare to the binary detection done by file(1), grep(1) and a other
standard *nix utilities that also do binary detection? Perhaps there's
others that do that I'm forgetting, but this seems like a problem
that's been solved before by multiple independent implementations.

I've never used these operators myself, but I can imagine that one of
the common usecases for them is as a heuristic to find files to pass
to those other commands, what are they commonly used for?

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About