I have a script that uses "rand" to add one of the four letters (ATCG) to a string:
#!/bin/perl use warnings; use strict; my $i =0; my $x; my $aa = ""; for ($i;$i<5007;$i++){ $x = int(rand(4)); if ($x == 0) { $aa .= 'A'; } elsif ($ x== 1) { $aa .= 'T'; } elsif ($x == 2) { $aa .= 'C'; } else { $aa .= 'G'; } } open (FILE, '>./test'); print FILE "$aa"; close (FILE);
It works but also sends : "Useless use of private variable in void context at 8 line 24." What does it mean?
In reply to Useless use of private variable in void context at by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |