or download this
#!/usr/bin/env perl # because perlbrew
# perl ./gradation.pl without using chmod u+x gradation.pl
...
# The file handle is automatically closed when the program ends,
# but can be explicitly closed with:
close($grades_fh) or die "Can't close $filename: $!\n";