![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: C-style for loopby toolic (Bishop) |
on Nov 15, 2008 at 19:12 UTC ( #723829=note: print w/replies, xml ) | Need Help?? |
Those 2 loops do quite different things.
If your goal is to create a new array, @cleaned_values, from another array, @values, you could use a "for" loop like this:
Alternately, you could use map for this:
Update: The code in the OP was modified after I composed this node.
In Section
Seekers of Perl Wisdom
|
|