in reply to Re: Re: 2 bit Math puzzle
in thread 2 bit Math puzzle
If you add one, you run the risk of accessing an element that doesn't exist. Trust me.@a = qw( a e i o u ); # indices are 0, 1, 2, 3, 4 $x = int rand @a; # $x is a random integer # st 0 <= $x < @a # where @a is 5 # thus, 0 <= $x < 5 # thus, $x is from 0 to 4
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: 2 bit Math puzzle
by sparkyichi (Deacon) on Dec 14, 2001 at 00:15 UTC |