my @req_fields = qw( Shipping_address ... shipdayph ); my @filled = grep { $query->param($_) } @req_fields; failure if @req_fields && @filled