in reply to search and replace with serialized answers
#!/usr/bin/perl use strict; my $max = 3; my $counter = 1; while (<DATA>) { chomp; print "${_}$counter\n"; $counter == $max ? $counter = 1 : $counter++; } __DATA__ test test test test test test [download]