Remove the $i++ line. With it in there, you can end up attempt to fetch $primes[@primes], which returns undef.sub Get_Target{ ###Gets two random primes a creates the goal. my $i = @primes; $i++; my $value1 = int(rand($i)); my $value2 = int(rand($i)); $goal = $primes[$value1] * $primes[$value2]; }
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
In reply to Re: 2 bit Math puzzle
by japhy
in thread 2 bit Math puzzle
by sparkyichi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |