On Tue, 8 May 2001, Larry Wall wrote:
 
> In this view, * and < could just be two different kinds of "expandable" flags.
> But I'm uncomfortable with that, because I'd like to be able to say
> 
>     lazy_sub(<$STDIN, <$STDIN, <$STDIN, <$STDIN)
> 
> to feed four lines to lazy_sub without defeating the prototype, er,
> signature checking.  Maybe you have to us *<$STDIN to do both.  But that
> would probably say to slurp the whole rest of the file.

        You know, it would be really cool if you specify the number of
lines you wanted like so:

        <$STDIN                 # One line
        *<$STDIN                # All available lines
        *4<$STDIN               # Next 4 lines

Or even:

        *$num_lines<$STDIN      # Numifies $num_lines, gets that many
        *int rand(6)<$STDIN     # Gets 0-5 lines
        *&mySub($bar)<$STDIN    # mySub returns num, gets that many



Dave

Reply via email to