TIMTOWTDI. There is one of them:
use strict;
use warnings;
while () {
next unless /^FIELDS=\(([^)]*)\)/;
my @fields = split ',', $1;
while (@fields) {
my @subfields = splice @fields, 0, 4;
print "$. @subfields\n";
}
}
__DATA__
FIELDS=(1,2,3,4)
FIELDS=(1,10,3,A,11,10,7,D,9,10,11,A)