Garrett Goebel
Fri, 11 Oct 2002 06:53:35 -0700
From: Paul Kulchenko [mailto:[EMAIL PROTECTED]]
>
> > 1..5 are numeric literals. I would have expected an error like:
> >
> > Can't modify constant item in postincrement (++) at ...
> > or
> > Modification of a read-only value attempted at ...
> no. 1,2,3 are literals, but 1..5 is operator.
>
> [perlop.pod]
> Binary ".." is the range operator, which is really two different
> operators depending on the context. In list context, it returns an
> array of values counting (up by ones) from the left value to the
> right value.
>
> it has the same effect as if you would get using an anonymous array:
>
> $_++ for (@{[1,2,3]})
>
> Comma is different.
You learn something every day... Thank you!
--
Garrett Goebel
IS Development Specialist
ScriptPro Direct: 913.403.5261
5828 Reeds Road Main: 913.384.1008
Mission, KS 66202 Fax: 913.384.2180
www.scriptpro.com [EMAIL PROTECTED]