In a flat-file world, I think it depends what you plan to do with the data.
If you want to show all of the grades at the same time I would use a single text file and read each student to build the results. You can easily do comparisons, averages, search for grade ranges, etc. this way. You can also easily manually type up and edit this single text file.
If you want each student to access only his own grades I would use the multiple text files approach. Each student can also easily update information in his file this way, without reading and writing everything. Each file will have to have a unique name, but even if you implemented a retrieve by name function on a single text file you would have an issue if two student shared the exact same name. You should write a script to generate these multiple files from a master file, or even better, some sort or management script to oversee the creation and updating of the contents. This may be helpful:
sub readnames
{
opendir THISDIR, '../students';
@allnames = readdir THISDIR;
closedir THISDIR;
}
This passes all of the (file) names in the "students" directory to
@allnames where you can use it to update or delete the individual student files.
Either way, don't forget to lock your files with FLOCK.