X-Git-Url: http://git.tpope.net/?p=tpope-extra.git;a=blobdiff_plain;f=perl%2Fschedproc;h=2a80bc3df745f296e61985445c172f254d6c1f81;hp=81f4a1aec943be197811efe3cfe9675544930d98;hb=refs%2Fheads%2Fmaster;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;
}