Fair enough. I obviously missed the later post where the goal posts were moved. :-)
The second of my two solutions would work equally well for an array. The chomp may not be necessary: hard to tell as the example input data presented in the OP looks more file data than array data.
— Ken
In reply to Re^3: Manually incrementing @ array during for
by kcott
in thread Manually incrementing @ array during for
by cniggeler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |