in reply to array and counting

Hi,
I would go for something like this:
foreach (@seq) { my ($res1, $res2, $res3); print "in : $_\n"; while (/(\w)(\w)(\w)/g) { $res1 .= "$1$2"; $res2 .= "$2$3"; $res3 .= "$3$1"; }; print "out1: $res1\n"; print "out2: $res2\n"; print "out3: $res3\n"; };

You can skip the print statements of course.
si_lence