in reply to readline fuction reading char by char
in thread gzreadline issue with new perl and new debian os

[ Woops, this answers the title question, but not the actual question ]

read

Since we're talking about binary data, there's also

sysread

See What is the difference between read and sysread?