Enlil (et. al.), one of the convenient things about qr// is that it returns a self-contained regex. That means your "later on" code can be
/^$x{5}$x$/
It seems weird to me that there's no simpler way to say "pattern X, N times, with pattern Y in between"... you have to write /^(?:XY){N-1}X$/. I wonder if there's something in Regexp::Common for that.
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perlhacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;