@negs = qw ( foo bar baz ); foreach $neg (@negs) { if (param('$neg') eq "") { param(-name=>"$neg", -value=>-1) ; } }