Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Useless use of private variable in void context at
by GrandFather (Saint) on Nov 23, 2014 at 22:13 UTC | |
by Anonymous Monk on Nov 23, 2014 at 22:54 UTC | |
by RonW (Parson) on Nov 24, 2014 at 18:10 UTC | |
by GrandFather (Saint) on Nov 24, 2014 at 20:21 UTC | |
|
Re: Useless use of private variable in void context at
by roboticus (Chancellor) on Nov 23, 2014 at 23:14 UTC |