neilwatson has asked for the wisdom of the Perl Monks concerning the following question:
I have a file whose size is X bytes. I'd like to read the file into an array (1 line is 1 array element). Easy enough. However, I do not want the array to be greater than 24 kilobytes in size. If the size is greater than that, the script should continue reading the contents into a new array.
In the end I should have X number of arrays, all less than 24kB, whose combined contents is equal to the original file.
Neil Watson
watson-wilson.ca
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Controlling the Size of an Array based on its file source.
by Joost (Canon) on May 29, 2002 at 13:37 UTC | |
|
Re: Controlling the Size of an Array based on its file source.
by broquaint (Abbot) on May 29, 2002 at 13:42 UTC |