foreach $key (keys %FORM){ #$key is now the name of the submitted formelement. #$FORM{$key} represents it's value }