--- loncom/lonr 2014/11/16 02:10:41 1.9 +++ loncom/lonr 2014/11/16 15:35:27 1.10 @@ -3,7 +3,7 @@ # The LearningOnline Network with CAPA # Connect to R CAS # -# $Id: lonr,v 1.9 2014/11/16 02:10:41 raeburn Exp $ +# $Id: lonr,v 1.10 2014/11/16 15:35:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -353,10 +353,10 @@ sub getroutput { my $realoutput=''; foreach my $line (split(/\n/,$output)) { - $line=~s/\s$//gs; - if ($line=~/^Error\:/) { $syntaxerr=1; next; } - if ($line=~ /\;$/) { next; } - if (my ($result)=($line=~/^\s*\[?\d+\,?\]?\s*(.*)/)) { $realoutput.=$result."\n"; } + $line=~s/\s$//gs; + if ($line=~/^Error\:/) { $syntaxerr=1; next; } + if ($line=~ /\;$/) { next; } + if (my ($result)=($line=~/^\s*\[?\d+\,?\]?\s*(.*)/)) { $realoutput.=$result."\n"; } } if (wantarray) { return ($realoutput,$syntaxerr);