There is even an easy way :-)
push the $counter to one array and the $_ to another instead of (or after the) print
RataIn reply to Re^3: How to continue numbering after a regular expression has been found
by Ratazong
in thread How to continue numbering after a regular expression has been found
by jpoldot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |