sub validate_fields { my ($colvalue,$colname) = @_; if ($colname eq 'P_DLRUOM') { warn "Checking '$colvalue' for validity in 'P_DLRUOM':"; return validate_p_dlruom( $updateval ); } elsif ($colname eq 'FOO') { warn "Checking '$colvalue' for validity in 'FOO':"; return validate_foo( $updateval ); } else { warn "Unknown column name '$colname' passed."; return; }; };