in reply to Hex to array conversion

AnonymousI'm wondering how I can convert a hex RGB string (i.e. "#ff00ff") into the corresponding triplet

This sounds not too complicated. In addition to the
unpack solutions already posted, you could make it short
with regexes:
... my $RGB = '#FF00FF'; @triplet = map hex, $RGB =~ /\w\w/g; ...
or even
... my $RGB = '#FF00FF'; () = $RGB =~ /(\w\w)(?{push @triplet, hex $^N})/g; ...
depending on your mileage ;-)

Regards

mwa