my $fmt = join '', grep !m[^#], qw[ x[10] a5 #code x[22] a10 #thingummy x[4] a3 a2 #doodah&whatsit ... ];