in reply to Perl reads minimum 8KB from files. Can this be lowered?

You can set the amount that Perl reads by setting the $/ variable, to (in your case) \512. See perlvar for more information on $/.

Replies are listed 'Best First'.
Re^2: Perl reads minimum 8KB from files. Can this be lowered?
by ikegami (Patriarch) on Apr 08, 2022 at 16:13 UTC

    That's not true. That will just change the amount returned.

    $ strace perl -e'$/ = \512; 1 while <STDIN>' <a 2>&1 | grep 'read(0' read(0, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"..., 8192) = 8192 read(0, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"..., 8192) = 8192 read(0, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"..., 8192) = 3616 read(0, "", 8192) = 0