in reply to Get even postion elements in an array
You teacher will be fascinated by your double-usage of $i++ ;-) ......don't do this in production-code!for (my$i=1; $i <= $#input; $i++) { push (@output, $input[$i++]) };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Get even postion elements in an array
by roboticus (Chancellor) on Nov 16, 2010 at 13:18 UTC |