X-Git-Url: http://git.tpope.net/?p=tpope-extra.git;a=blobdiff_plain;f=perl%2Fschedproc;fp=perl%2Fschedproc;h=2a80bc3df745f296e61985445c172f254d6c1f81;hp=81f4a1aec943be197811efe3cfe9675544930d98;hb=077b9ca591ea5e907d975f38449e3fefeb61e815;hpb=bda4e7dc19a041c49e7f2bab8051fa3921a59503 diff --git a/perl/schedproc b/perl/schedproc index 81f4a1a..2a80bc3 100755 --- a/perl/schedproc +++ b/perl/schedproc @@ -586,13 +586,15 @@ sub do_html_grades { print "\n"; } } - my $lastrow = $grades->{'cumulative'}->[scalar @{$grades->{'cumulative'}}-1]; - print 'Cumulative: through ', capitalize($lastrow->{'term'}); - print ''; - print $lastrow->{'gpa'}; - print ''; - print join('', ($lastrow->{'earned'}, $lastrow->{'hours'}, $lastrow->{'points'})); - print "\n"; + if(exists($grades->{'cumulative'})) { + my $lastrow = $grades->{'cumulative'}->[scalar @{$grades->{'cumulative'}}-1]; + print 'Cumulative: through ', capitalize($lastrow->{'term'}); + print ''; + print $lastrow->{'gpa'}; + print ''; + print join('', ($lastrow->{'earned'}, $lastrow->{'hours'}, $lastrow->{'points'})); + print "\n"; + } print "\n"; select STDOUT; }