sub simple_hash { my ($string) = @_; chomp $string; my @chars = split //, $string; my $counter; foreach my $char (@chars) { $counter += ord $char; } $counter = $colors[$counter % 11]; return $counter; }