if(($ma == 1) && ($sy == 1)) { if($al == 1) { print "\nshow some text.\n"; notify(); } elsif($tr == 1) { print "\nnext data info\n"; notify(); } elsif($ge == 1) { print "\nnew info here\n"; notify(); } }