#!/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"; #### =ariable ending with carrige return is =foo Use of uninitialized value in concatenation (.) or string at try1.pl line 8.