--- loncom/xml/run.pm	2015/06/23 02:52:20	1.64
+++ loncom/xml/run.pm	2020/03/12 20:20:13	1.66
@@ -1,6 +1,6 @@
 package Apache::run;
 #
-# $Id: run.pm,v 1.64 2015/06/23 02:52:20 raeburn Exp $
+# $Id: run.pm,v 1.66 2020/03/12 20:20:13 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -41,7 +41,7 @@ while (!$_LONCAPA_INTERNAL_oldexpression
              #             or  hash dereferences {}
              # the ^$ and ^& is because we do this iteratively
              #    $a[$c] becomes $a[3] which then evaluates
-             ([\[\{][^\$\&\]\}]+[\]\}])*?
+             ((?:[\[\{][^\$\&\]\}]+[\]\}])+|)
              # $3 is the list of arguments
              (\([^\$\&\)]+\))*?
                 # only match the above if there is not { [ ( coming up
@@ -165,7 +165,7 @@ sub dump {
     my $dump='';
     foreach my $symname (sort(keys(%{$safeeval->varglob('main::')}))) {
 	if (($symname!~ /^(INC|SIG)/) && ($symname!~/\027/) && ($symname!~/\022/) && 
-	    ($symname!~/^\_/) && ($symname!~/\:$/)) {
+	    ($symname!~/^\_/) && ($symname!~/\:$/) && ($symname ne '!')) {
 	    my $line;
 	    if ($safeeval->reval('defined($'.$symname.')')) {
 		if ($symname =~ /^\w/) {