Quoth bill <>:
> In <c966vt$bkc$> Ben Morrow <> writes:
>
>
> >Quoth bill <>:
> >> Surprisingly, to me at least, this doesn't produce any errors:
> >>
> >> for my $y (1..3) {
> >> $y = 0;
> >> }
> >>
> >> Perl doesn't see the above as analogous to
> >>
> >> 1 = 0; # triggers "Can't modify constant item" error
>
> >No: an array element is an lvalue, and modifiable.
>
> Ah, yes. Somehow I thought that '..' returned a list. Come to
> think of it, does anything in Perl *ever* return a list?
Hang on, no, I misread your code... my brane read it as
for my $y (@x) {
.. Hmmm; I'm puzzled too

. I think I'd call this a perl bug, especially
as
for my $y (1, 2, 3) {
fails...
Ben
--
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based
on the strictest morality. [Samuel Butler, paraphrased]