From f00c24b945015f817e626441ccb5248da06da450 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Wed, 11 Mar 2015 23:58:05 -0400 Subject: [PATCH] Trim whitespace too when trimming comments --- grade.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grade.pl b/grade.pl index 737fe14..0dacb9f 100755 --- a/grade.pl +++ b/grade.pl @@ -147,7 +147,7 @@ sub finishOverall() { # {{{ } # }}} # Main dispatch {{{ while(my $line = ) { - $line =~ s/#.*$//; # trim line comments + $line =~ s/\s*#.*$//; # trim line comments next if ($line =~ /^\s*$/) ; chomp $line; -- 2.50.1