in reply to Useless use of hash element in void context

The problem is that you're trying to use the 'fat comma' (=>) to assign to the hash, where in actual fact you just want the plain assignment operator e.g
$hash_codes{$2} = $5;
The 'fat comma' behaves just like the normal comma operator but stringifies its left-hand argument and if its left-hand argument is a bareword it is exempt from strict. See. the perlop manpage for more information on the assignment and 'fat comma' operators.
HTH

_________
broquaint