Unfortunately, the story is about as clear as mud. In recent Perl's, there are optimizations to avoid generating the entire list up front when and where possible. For instance:
You will see by checking memory consumption that the list is not generated.for (1 .. 2_000_000_000) { print "$_\n"; }
Cheers - L~R
In reply to Re^2: foreach to for
by Limbic~Region
in thread foreach to for
by tricolaire
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |