Charles K. Clarkson wrote on 23.04.2004: >Jan Eden <[EMAIL PROTECTED]> wrote: >: >: Jeff 'japhy' Pinyan wrote on 23.04.2004: >: >: > # read 6 lines from IN and put them in @record >: > my @record = map scalar(<IN>), 1 .. 6; >: >: How does this work? >: >: In the map function you gave, the first argument is scalar, >: which takes only one argument and returns a line from INPUT >: in scalar context. But how are the numbers from the range >: operator applied to the expression scalar(<IN>)? > > They're not applied. The range acts as a counter.
I knew that, but I forgot about the basic function of the angle operator, i.e. to return the *next* line of the associated filehandle each time it is invoked. How embarassing. Thanks, Jan -- Common sense is what tells you that the world is flat. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
