in reply to Re: Re: Data structure challenge
in thread Data structure challenge
Okay. Forget the bareword SPARSE, it is just a filehandle, opened (R/W) to an in memory file per perlfunc:open (5.8.x):
File handles can be opened to ``in memory'' files held in Perl scalars via:
open($fh, '>', \$variable) || ..
My inspiration was that if you seek on an in-memory file, the string is extended, without being initialised. Of course it isn't if it is going to emulate a file. If you seek to a position in a random access file you don't want everything preceding it to be overwritten.
So, a pure-perl way of allocating a buffer without initialisation.
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail