Your downfall is your lack of:
use strict;
That's why you didn't notice that you called the key $ckey but referred to it in a number of places as $key:
if (ref($work_hash{$key}) eq "HASH")
-sam
In reply to Re: removing the spaces from keys of a complex hash
by samtregar
in thread removing the spaces from keys of a complex hash
by gwhite
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |