--- loncom/lonr 2009/04/17 01:00:10 1.3 +++ loncom/lonr 2009/04/18 16:03:14 1.4 @@ -3,7 +3,7 @@ # The LearningOnline Network with CAPA # Connect to R CAS # -# $Id: lonr,v 1.3 2009/04/17 01:00:10 www Exp $ +# $Id: lonr,v 1.4 2009/04/18 16:03:14 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -316,7 +316,7 @@ sub make_new_child { sub sync { my ($command)=@_; $counter++; - my $expect=$counter.time; + my $expect=$counter; print $command "$expect;\n"; while (1) { my $output=&getroutput($command); @@ -352,7 +352,7 @@ sub getroutput { foreach my $line (split(/\n/,$output)) { $line=~s/\s$//gs; if ($line=~/^Error\:/) { $syntaxerr=1; next; } - if (my ($result)=($line=~/^\[\d+\,*\]\s*(.*)/)) { $realoutput.=$result."\n"; } + if (my ($result)=($line=~/^\[?\d+\,*\]?\s*(.*)/)) { $realoutput.=$result."\n"; } } if (wantarray) { return ($realoutput,$syntaxerr);