Maybe you should be using a Hash of Arrays:
$ perl -le'
my $str = "A: Gold, Black, Purple, Blue, Red B: Black, Neon Pink,
+Neon Yellow, Neon Green, Neon Purple, Red, White, Neon Orange, Navy";
my %hash = map s/:// ? $_ : [ split /\s*,\s*/ ], grep length, split /\
+s*(\w+:)\s*/, $str;
use Data::Dumper;
print Dumper \%hash;
'
$VAR1 = {
'A' => [
'Gold',
'Black',
'Purple',
'Blue',
'Red'
],
'B' => [
'Black',
'Neon Pink',
'Neon Yellow',
'Neon Green',
'Neon Purple',
'Red',
'White',
'Neon Orange',
'Navy'
]
};