> On Jun 7, David Gilden said:
>
> >@colors = qw[ #F0F8FF #00 #7FFFD4 #F0 #F5F5DC #FFE4C4 #4169E1
> >#8B4513 #FA8072 #F4A460 #2E8B57 #A0522D ];
> >
> >
> ># choose a color!
> >$color_choice1 = rand $#colors;
On Thursday, June 7, 2001 at 3:40 PM, [EMAIL PROTECTED] (Jeff 'japhy' Pinyan) w
On Jun 7, David Gilden said:
>@colors = qw[ #F0F8FF #00 #7FFFD4 #F0 #F5F5DC #FFE4C4 #4169E1
>#8B4513 #FA8072 #F4A460 #2E8B57 #A0522D ];
>
>
># choose a color!
>$color_choice1 = rand $#colors;
You're never going to select "#A0522D" this way -- you need to use
rand(@colors), not rand($#col
Is this the correct way to avoid getting the same value twice?
# Text colors
@colors = qw[ #F0F8FF #00 #7FFFD4 #F0 #F5F5DC #FFE4C4 #4169E1 #8B4513 #FA8072
#F4A460 #2E8B57 #A0522D ];
# choose a color!
$color_choice1 = rand $#colors;
# make sure we don't get same color twice
$color_c