Hallo,
I have a printing error, I can not print 2500 random DNA (A C T G).
can some one here fix my problem
best regards
--------------------------------------------------
#!/usr/bin/perl -w
# 2500 random bases
print "ask for file name: ";
$filename = <STDIN>;
open BN, ">$filename";
my@DNA = ('A','C','G','T');
my $DNA;
for (1 .. 2500) {
$DNA = $DNA[int(rand(length(@DNA)))];
}
print BN "$DNA\n";
close BN;
exit;
I have a printing error, I can not print 2500 random DNA (A C T G).
can some one here fix my problem
best regards
--------------------------------------------------
#!/usr/bin/perl -w
# 2500 random bases
print "ask for file name: ";
$filename = <STDIN>;
open BN, ">$filename";
my@DNA = ('A','C','G','T');
my $DNA;
for (1 .. 2500) {
$DNA = $DNA[int(rand(length(@DNA)))];
}
print BN "$DNA\n";
close BN;
exit;