JC said:
I have a hash, with key bodybgcolor pointing to a hexadecimal color
string "#FF9966". Problem is, I'm not allowed to pring the "#" sign, so
I need to print "FEDCBA". How do I do that?
What have you tried and where did it fail to meet your expectations?
As it is a veeeery simple problem with numerous possible solutions (a
truly TMTOWTDI):
my $string = '#FF9966';
my $result1 = substr($string, 1);
my $result2; ($string2 = $string) =~ s/^#//;
my $result3; ($string3 = $string) =~ tr/^#//d;
Pick your choice.
However, as your original string is "#FF9966" and your resulting string
has absolutely no connection with the original string (apart from some
length and character set considerations):
$result = 'FEDCBA';
Josef