P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
"c-style" is just the name of the loop, it depends what you need...TIMTOWTDI! (*)
Anyway, with foreach-loop you shouldn't need a new array, since the iterating variable is an alias.
(*)UPDATE: in many cases foreach-loops are easier to maintain and less redundant than c-style. If you explicitly need to generate a *new* array, prefere map or grep. Cheers LanX - - - - - Which song??? In reply to Re: C-style for loop
by LanX
|
|