Hi All,
I'm trying to test a Hash variable but it's not working. Here is my code - can anyone tell me if the test is valid?
for (keys %enabled_yn) {
if ($enabled_yn{$1} =~ m/\s+Y/) {
$html =~ s/%(\w+)%/\<b\>\<font color\=orange\>$enabled_yn{$1}\<\/font\>\<\/b\>/g;
} else {
$html =~ s/%(\w+)%/$enabled_yn{$1}/g;
}
}
If the variable contains a Y (there is some leading white space hence the \s) then it should output it in bold orange (to a place holder %%). Anything else just gets put into its relevant place holder.
Any ideas on how I can do this?
Many thanks,
pondlife.