The foreach keyword is actually a synonym for the for keyword, so you can use foreach for readability or for for brevity.and then later:
And it's faster because Perl executes a foreach statement more rapidly than it would the equivalent for loop.That second quote (yours) is in regards to for ($i = 0; $i < @array; $i++) { $array[$i] ... } vs. foreach (@array) { $_ ... }
In reply to Re^5: how to traverse thru this hash?
by japhy
in thread how to traverse thru this hash?
by rsennat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |