Главная страница


ru.perl

 
 - RU.PERL ----------------------------------------------------------------------
 From : Andrey Titov                         2:5020/400     19 Jan 2002  19:34:56
 To : Dmitry Smolin
 Subject : Re: Файл с русскими буквами - не текстовый. Почему?
 -------------------------------------------------------------------------------- 
 
 > === Cut ===
 > 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 _characters with the high bit set_. If too many
 > strange characters (>30%) are found, it's a "-B" file, otherwise
 > it's a "-T" file. Also, any file containing null in the first
 > block is considered a binary file. If "-T" or "-B" is used on a
 > filehandle, the current stdio buffer is examined rather than the
 > first block. Both "-T" and "-B" return true on a null 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".
 > === Cut ===
 
 Спасибо.
 
 Заработало с -f:
 
 if (-f $FILE) { ...
 
 При этом с -e вылетает на ошибку.
 Странно как-то.
 --- ifmail v.2.15dev5
  * Origin: MTU-Intel ISP (2:5020/400)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 Re: Файл с русскими буквами - не текстовый. Почему?   Andrey Titov   19 Jan 2002 19:34:56 
Архивное /ru.perl/9104488ea9a1.html, оценка 2 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional