Dave Storrs writes:
:       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

Given appropriate overloading on the iterator object:

    @foo = $STDIN * 4;

Larry

Reply via email to