my $send_now_button = $auth{'SEND'} && $status==1 && $approved && !$send_now ? qq( ...blah blah ...) : ''; #### 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 = ''; } } } }