my $send_now_button; if ( !$auth{'SEND'} ) { $send_now_button = ''; } else { if ( $status != 1 ) { $send_now_button = ''; } else { if ( $approved ) { if ( $send_now ) { $send_now_button = ''; } else { $send_now_button = qq( ...blah blah ...); } } else { if ( $send_now ) { $send_now_button = ''; } else { $send_now_button = ''; } } } }