how to pull the next four lines out of a file handle in
way new syntax,

Larry Wall wrote:
> 
> Dave Storrs writes:
> : < QUOTE LARRY >
> : Dave Storrs writes:
> :     @foo = $STDIN * 4;
> :
> : Larry


What's wrong with old-fashioned autoextending array slices that
now DWIM

        splice @foo,@foo,4,readline(STDIN);

Getting splice to coerce that reference that @foo is returning
into it's length method is all behind-the-scenes;  this is
a toenail-trimming incremental improvement which would break
any very strange code which did exactly that and expected readline
in an array context to wipe out the rest of the stream.  I've
got $2.37 for the first person to produce a piece of code not
contrived as an example where a slurp in a splice is used.



-- 
                      David Nicol 816.235.1187 [EMAIL PROTECTED]
                                                     # die smiling;

Reply via email to