in reply to Restriction on getting multiline data into a string
By setting $/ to a reference to an integer, you can control how many bytes are read in each use of the diamond operator.
local $/ = \65536; my $scalar = <FILE>; print length $scalar; # prints 65536 (assuming :raw)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Restriction on getting multiline data into a string
by bart (Canon) on Nov 19, 2003 at 10:35 UTC | |
|
Re^2: Restriction on getting multiline data into a string
by strictvars (Sexton) on Apr 13, 2005 at 15:33 UTC |