in reply to perl CGI: No such file or directory yet file exists???

In addition to fishmonger's advice above, you should consider adding:
use Cwd;
so that you can include the process's current working directory in the error message:
open( GRADES, '<', $grades ) or die sprintf("error opening %s: %s (%d) cwd=%s\n", $grades, $!, $ +!+0, getcwd );