my $color = $colors[rand @colors];Or
which does the exact same thing, but doesn't depend on the knowledge that numbers used as array indexes are truncated to integer, instead of rounded.my $color = $colors[int rand @colors];
In reply to Re^2: Error while taking 'Scalar of scalar'
by bart
in thread Error while taking 'Scalar of scalar'
by cool
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |