Somehow you have to loop through the array and modify the values in place with the exponentiation operator (or the multiplication operator). perlsyn describes most of the interesting parts in the section on "Foreach Loops".
In reply to Re: Square the array values.
by chromatic
in thread Square the array values.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |