in reply to Error while taking 'Scalar of scalar'

Quasi-relevant: my $randcolor = $colors[ int rand $#colors ]; misses the last one every time. :(

You might want my $randcolor = $colors[ rand @colors ]; instead.

-Paul