W
Wybo Dekker
Does ruby have file tests like Perl's:
-t : file (mostly STDIN) is attached to a tty
-B : file is binary
-t : file (mostly STDIN) is attached to a tty
-B : file is binary
ts said:W> -B : file is binary
Define what is a binary file ?
In this context, Perl essentially means that the file has a lot of
non-ASCII characters. From the perlfunc man page
-T File is an ASCII text file (heuristic guess).
-B File is a "binary" file (opposite of -T).
and
The "-T" and "-B" switches work as follows. The
first block or so of the file is examined for odd
characters such as strange control codes or char-
acters with the high bit set. If too many strange
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.