use strict; use warnings; my $score = 77; my $grade = $score >= 90 ? 'A' : $score >= 80 ? 'B' : $score >= 70 ? 'C' : $score >= 60 ? 'D' : 'F' ; print "$grade\n";
In reply to Re: switch statement
by BillKSmith
in thread switch statement
by fionbarr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |