in reply to Problem assigning values to Hash

param('key') returns an empty list (in list context) in case it is empty.
replace all param()-calls with scalar param(...), then you'll see that some param()s are undef (update: or, as kvale said, they have multiple values).