in reply to More effective way of doing this

Not sure if I understand your question ...

Like this  @input = glob '{A,C,T,G}' x 5 ?

For instance: (debugger demo)

DB<4> x glob '{A,C,T,G}' x 2 0 'AA' 1 'AC' 2 'AT' 3 'AG' 4 'CA' 5 'CC' 6 'CT' 7 'CG' 8 'TA' 9 'TC' 10 'TT' 11 'TG' 12 'GA' 13 'GC' 14 'GT' 15 'GG'

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!