http://www.perlmonks.org?node_id=829430


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;