Dragan Cvetkovic said: > Adam Funk <[EMAIL PROTECTED]> writes: > >> On Tuesday 20 April 2004 13:50, John Hasler wrote: >> >>> Ciaran writes: >>>> Karsten probably answered the question you meant to ask, not the >>>> question you did ask >>> >>> And the pendantically correct answer is that Unix and Linux do not >>> have >>> text files. All Unix/Linux files are binary. >> >> Yes, but -T and -B tests in Perl know the difference! > > > According to the "Programming Perl" book, this works as follows: "The > first block or so of the file is examined for odd characters such as > strange control codes or metacharacters. If too many odd characters > (>10%) are found, it's -B file, otherwise it's a -T file". > > So, basically, Perl is cheating. >
The file command uses magic to figure it out. Is that any better? /Ciaran. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]