nataraj: (Default)
[personal profile] nataraj
Забавный зверек... Существует для того чтобы не открывая .gz-архив получить доступ к содержимому через file handle. Но...
my $fh = new IO::Zlib;
$fh->open("some_file.gz", "r");
print <$fh>;
Печатает весь файл. Update: И как оказывается правильно делает, это я дурак...
Попытка ему сказать $fh->input_record_separator("\n"); завершается ошибкой "Not a GLOB reference at /usr/share/perl5/IO/Zlib.pm line 566."
При этом построчно его читать можно посредством print $fh->getline(); Но разделитель строк только \n. Значение $/, как сказано в документации, он Currently ignores

Ну вообщем и на том спасибо
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

nataraj: (Default)
Swami Dhyan Nataraj

July 2024

S M T W T F S
 123456
789 10111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 20th, 2026 04:34 pm
Powered by Dreamwidth Studios