in reply to gpa.pl

Here's a better one, maybe. Note: my method of calculating GPA is slightly different. + and - add/sub. .5 instead of 1/3.
chomp($_=<>);$a=$_;s/([^a-f+-]|e)//ig;s/f//ig;s/a/spit(2);/ig; s/b/print;/ig;s/c/eof;/ig;s/d/}d/ig;s/.\-//ig;$b=$_;$_=$a; s/[^abcdf]//ig;$_=length;$b=length$b;$_=$b/(2*$_);print;
Update: Hey, the first time I didn't see the big 4...it was just mashed together. Neat. BTW, this can take input from a file or STDIN, formatted in any way or not at all. And it uses the rare spit() function :)