in reply to Re^2: Square the array values.
in thread Square the array values.
The latter is much better, though you could multiply and assign in place with =*:
for (@array) { $_ *= $_; }
... or even use postfix iteration:
$_ *= $_ for @array;
In Section
Seekers of Perl Wisdom