in reply to Re^4: Problems with Hash Keys and Spaces
in thread Problems with Hash Keys and Spaces

The error is generated because of using a carriage return in a string used as a hash key as shown by the following code:
#!/usr/bin/perl use strict; use warnings; my %hash = ("Common SW Component" => "4885"); my $variable = "foo\r"; print "variable ending with carrige return is =$variable=\n"; print "$hash{$variable}\n";
Output is:
=ariable ending with carrige return is =foo Use of uninitialized value in concatenation (.) or string at try1.pl l +ine 8.
Update:Even without the \r it would fail, simply because the hash value is undef and an attempt is made to print an undefined value.