On Tuesday, May 7, 2002, at 01:33 PM, Merlin, The Mage wrote:
> I don't see that this solution was correct, since I explicitly
> said that my
> $a, $b, and $c was constants, so it only could be a mistake try to
> change
> them.
>
> Flexibility is good, but with rules.
>
> You can do the same with the initial constants:
>
> perl -e 'for (@x=(1,2,3,4,5,6)) {$_++; print}'
>
> Can't you?
Yes, as I mentioned in my 'original post' comment here.
> > A fixed original post:
> > perl -e 'for ( @x = (1,2,3,4,5,6,7,8,9,10) ) { $_++; print }'
>
Who says DATA is sacred? This points to the POWER and DANGER of
Perl. The developers will either fix this behavior as things like
this are discovered (or they won't.)
Besides, won't you agree? That in both sets of problems above we
have 'changed' the constants into normal vars by making them an
ARRAY in each case? Therefore the effect is not behaving like a
constant?
???
_Sx____________________
('> -Sx- IUDICIUM
//\ Have Computer -
v_/_ Will Hack...
"iudicium ferat"
$_ = "Jacksonville Perl Monger";
while(/([Jacksonville Perl Monger])/g) {
print join(" ", map { defined $_ ? $_ : ""
} $`, $&, $', $+), "\n";
}