in reply to Automatic creation of hash elements

You have run into Autovivification.

To avoid that, you can do something like:

for( grep {exists $CATEGORY_DATA{$_}} 1..10){ if( $FD_NAME eq $CATEGORY_DATA{$_}{FIELD_NAME}) { ... } }

     "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom