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: <%-{-{-{-<
In reply to Re: How does $. work in one liner?
by AnomalousMonk
in thread How does $. work in one liner?
by elevenfly
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |