in reply to Re^2: Reading a huge input line in parts
in thread Reading a huge input line in parts

I cannot reproduce your problem but I was thinking of

use strict; use warnings; sub do_something { print '{', $_[0], "}\n" } { local $/ = ' '; while (<>) { do_something($_); } } do_something(<>);