in reply to Conditions and Function call
I will say that until you get more comfortable with Perl or are really trying for Perl golf, then I would suggest readablity over short.if(($ma == 1) && ($sy == 1)) { SWITCH: { $al == 1 && do { print "\nshow some text.\n"; notify(); last SWITCH; }; $tr == 1 && do { print "\nnext data info\n"; notify(); last SWITCH; }; $ge == 1 && do { print "\nnew info here\n"; notify(); last SWITCH; }; }; };
-Kurt
|
---|