Hi everyone,
I am trying to pull the value of a hash key that has spaces. First off, let me show you the code and then I will ask my question.
my %hash = (
"Common SW Component" => "4885",
"Test MMA" => "5130",
"Generic key" => "5033",
"Another generic key" => "4575",
);
print "$hash{$variable}\n";
Now, say
$variable contains a hash key. If the hash key contains a space I get this error, "Use of uninitialized value in concatenation (.) or string" However, if I were to type in
print "$hash{'key with space'}\n"; the value gets returned. Is it possible to have the value returned with the
$variable having spaces? I hope this makes sense. Thanks in advance.