tfoertsch has asked for the wisdom of the Perl Monks concerning the following question:
I know about eval "string" and do "filename.pl"
Now I have a stream that produces data blocks, something like a function that returns one data block per call. I don't want to store all the data in memory to do a string eval. So I thought of something like
(I know this does something else and is deprecated)do sub {...} # the function returns one data chunk per call
So, how about this?
Is that possible?do FILEHANDLE # FILEHANDLE is opened with a special PerlIO # layer that calls sub {...} on read.
Thanks,
Torsten
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: do FILEHANDLE ?
by tilly (Archbishop) on Mar 10, 2009 at 15:29 UTC | |
|
Re: do FILEHANDLE ?
by repellent (Priest) on Mar 10, 2009 at 16:38 UTC | |
|
Re: do FILEHANDLE ?
by rovf (Priest) on Mar 10, 2009 at 11:29 UTC |