#!/usr/bin/perl use strict; use warnings; my %my_hash = (); my $key1 = "T::c"; # The key has no quotation marks in it my $key2 = '"T::c"'; # This key does actually have the quotes $my_hash{$key1} = 'Nonquoted key'; $my_hash{$key2} = 'Quoted key'; # Show the hard-coded selection from the hash my $test_value = $my_hash{"T::c"}; print "\$test_value = $test_value\n"; # Show the whole hash foreach my $my_key (sort keys %my_hash) { print "\%my_hash{$my_key} = $my_hash{$my_key}\n"; } exit; #### S:\Steve\Dev\PerlMonks\P-2017-05-30@1228-Hash-Key-Quotes>hashkey1.pl $test_value = Nonquoted key %my_hash{"T::c"} = Quoted key %my_hash{T::c} = Nonquoted key