in reply to MiniBioGolf

Here is a slightly shorter version....
#23456789_123456789_123456789_123456789_123456 perl -e'print map qw(G T A C)[rand(4)],1..pop' 1000
And this trims one more char, but is only valid in 5.6 and above....
#23456789_123456789_123456789_123456789_12345 perl -e'print qw(G T A C)[rand(4)]for 1..pop' 1000

Update: hmm, looks like all solutions so far are only valid in 5.6 and above. Below 5.6 you'd have to add a set of parens around your list...

$c = (qw(A B C))[2];

-Blake

Replies are listed 'Best First'.
Re (tilly) 2: MiniBioGolf
by tilly (Archbishop) on Feb 20, 2002 at 23:05 UTC
    Shaving and making it legal in earlier Perls:
    #23456789_123456789_123456789_123456789_123 perl -e'print((G,T,A,C)[rand 4])for 1..pop' 1000