sub main{
my $mark;
my $grade;
my $calc;
@grade = ($mark>=0 and $mark<=39,$mark>=40 and $mark<=49,$mark>=50 and $mark<=59);
@calc(F+,D+,B+);
print "What is the student’s mark?"
chomp($mark = <STDIN>);
print "Your mark is 'mark' and grade is 'calc'"
}
main();
Hi i am a beginner, what i want to do is make different blocks of marks e.g. @mark(0-39,40-49,50-59) will point to the @calc(F+,D+,B+) respectively. After which i can print out the $mark from and also the grade corresponding to the mark. Thank you for your help.