in reply to conditional statement

The following version uses the same logic as the original, is easy to understand (and modify), and works on very old versions of perl.
use strict; use warnings; my ($score) = @ARGV; die "Score must be less than or equal to 100.\n" if $score > 100; my $letter_grade = $score <= 39 ? 'F' : $score <= 49 ? 'E' : $score <= 59 ? 'D' : $score <= 64 ? 'C' : $score <= 69 ? 'C+' : $score <= 74 ? 'B' : $score <= 79 ? 'B+' : 'A' ; print "The student has gotten a $letter_grade for the score of $score\ +n";