in reply to Trying to construct all possible strings from 4 bases [ATCG]
okay, and here's another way to do it: not so efficient probably, but fun nevertheless
my $base = join ",", qw/A T C G/; my $L = 4; my $string = "{$base}" x $L; my @combinations = glob $string; print join ":", @combinations;
He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.
Chady | http://chady.net/
Are you a Linux user in Lebanon? join the Lebanese Linux User Group.
|
---|
In Section
Seekers of Perl Wisdom