for my $c (1..$n1) {
The list 1..$n1 is created in memory and then iterated over so $n1 is only evaluated once.
If you instead used a C style for loop then $n1 would be evaluated $n1 times.
In reply to Re: does a hash element as a loop parameter cause significant slowdown?
by jwkrahn
in thread does a hash element as a loop parameter cause significant slowdown?
by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |