http://qs321.pair.com?node_id=1164419


in reply to How does $. work in one liner?

Please see the discussion of the  .. operator in scalar (not list!) context in Range Operators in perlop. Also see discussion of  -n switch in perlrun. Also see  $. in perlvar. (Update: BTW: As far as I'm aware, there's no difference between the way  $. behaves in a one-liner versus the way it behaves anywhere else.)

Update: I always forget these in our own Tutorials: Flipin good, or a total flop? and The Scalar Range Operator.


Give a man a fish:  <%-{-{-{-<