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) { $_ *= $_; } [download]
... or even use postfix iteration: