in reply to How to escape # sign in key name

I think the problem is that you're hoping for too much intelligence on the part of =>. When perl (Perl?) sees the bare '#', it assumes it's an end-of-line comment. If, however, you quote the key, it works fine.

#!/usr/bin/perl -w use strict; my %hash = ( partname => "large widget", 'cata#ofitem' => "4321" ); print $hash{ 'cata#ofitem' }, "\n";

correctly reports "4321" as expected.