Non-Perl solution, so feel free to ignore: there are tools available that lay down a regular track of markers every few millimetres on cloth. The ones I've seen use a toothed wheel rubbing against a stick of chalk.
No idea what they're called; stitching markers, perhaps? They look like they'd do the job for you.
--
bowling trophy thieves, die!