Thanks for your reply. I know it is an FAQ, That's where I got the Fisher Yates option from, But unable to correctly implement it in my code..
If I try the list util it doesnt work... My code looks like this
print "enter sequence and signal end with enter followed by ctrl d\n"; $sequence = <STDIN>; chomp $sequence; print "sequence inserted : $sequence\n"; @trips = unpack("a3" x (length($sequence)-2), $sequence); @trips = join(" ", @trips); use List::Util 'shuffle'; @shuffled = shuffle(@trips); print "@shuffled\n";
What is wrong/missing here?
I am incapable of installing the list::utils, I wouldn't know where to unpack them and how to properly install and run them. Do they need to be situated somewhere. I am on perl v5.18.2, so the list utils should already be there you mention?
How would I implement the fisher Yates algorithm correctly?
In reply to Re^2: Shuffling codons
by WouterVG
in thread Shuffling CODONS
by WouterVG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |