in reply to Set Combination

Might make it easier to catch the bug if you simplify the conditionals. You've got three basic conditions you're testing for here... why not break out their tests into their own subs?
sub is_netdaysdue_format { return ($DISCPCNT ne "") && ($DISCDAYSDUE ne "") && ($NETDAYSDUE ne "") && ( ($DISCDUEDATE eq "") && ($NETDUEDATE eq "") && ($TERMSDISCAMT eq "") ); } sub is_discountamount_format { return ( ($DISCDUEDATE ne "") && ($TERMSDISCAMT ne "") && ($DISCPCNT eq "") && ($DISCDAYSDUE eq "") && ($NETDUEDATE eq "") && ($NETDAYSDUE eq "") ); } sub is_discountpercent_format { return ( ($DISCPCNT ne "") && ($DISCDUEDATE ne "") && ($DISCDAYSDUE eq "") && ($NETDUEDATE eq "") && ($NETDAYSDUE eq "") && ($TERMSDISCAMT eq "") ); }
Then your test becomes:
(is_netdaysdue_format() || is_discountamount_format() || is_discountpercent_format()) or print "Format must be..."

stephen

Updated: First revision sounded unintentionally irritating and too wordy.