Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Trying to construct all possible strings from 4 bases [ATCG]

by Chady (Priest)
on Feb 21, 2005 at 13:49 UTC ( #433048=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: Trying to construct all possible strings from 4 bases [ATCG]
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://433048]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2015-07-31 20:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (281 votes), past polls