--- loncom/xml/run.pm 2000/11/16 14:20:05 1.12 +++ loncom/xml/run.pm 2000/11/20 17:34:05 1.13 @@ -27,7 +27,7 @@ $Apache::run::EVALUATE_STRING=<<'ENDEVAL my %oldexpressions=(); while (!$oldexpressions{$_}) { $oldexpressions{$_}=1; - $_ =~s/((?:\$|\&)(?:[\#|\$]*[A-Za-z][\w]*|\{[A-Za-z][\w]*\}))([\[|\{][\w\'\"]+[\]\}])*?(\([\w\'\"]+\))*?(?=[^\[\{\(]|$)/eval(defined(eval($1.$2))?eval('$1.$2.$3'):'$1.$2.$3')/seg; + $_ =~s/((?:\$|\&)(?:[\#|\$]*[A-Za-z][\w]*|\{[A-Za-z][\w]*\}))([\[\{][^\$\&\]\}]+[\]\}])*?(\([^\$\&\)]+\))*?(?=[^\[\{\(]|$)/eval(defined(eval($1.$2))?eval('$1.$2.$3'):'$1.$2.$3')/seg; } ENDEVALUATE @@ -42,7 +42,7 @@ sub evaluate { # $safeeval->reval('{'.$decls.';<< &evaluate(q|'.$expression.'|);}'); if ($@ eq '') { $result = $safeeval->reval('return $_;'); - chop $result; + chomp $result; } else { &Apache::lonxml::error("substitution on:$expression:with:$decls:caused $@"); }