Then why not:
my @results; foreach (@data) { push @results, $_ * 13; }
To avoid the mutation of @data ?
In reply to Re^3: Getting a result from "foreach" block
by RonW
in thread Getting a result from "foreach" block
by v_melnik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |