my $key = ''; foreach $key (keys %$p_upload_files) { my $p_hash = $$p_upload_files{$key}; next unless (($p_hash) and (defined($$p_hash{'server file name'}))); $FORM{$key . "_filename"} = $$p_hash{'server file name'};