chiark / gitweb /
Improvements.
[ian-dotfiles.git] / gpt
diff --git a/gpt b/gpt
index f16320caa464853689ee842154c95949592222ac..85246507b19249b77b95c185ee7cd52f6e6f1f29 100755 (executable)
--- a/gpt
+++ b/gpt
@@ -89,10 +89,10 @@ sub process_input () {
        print DEBUG "L $fn:$lno:",join('',@oplist),
                    ":`$l' e\`$expr' s\`$substr'\n";
        if (@oplist & 1) { # scanning perl
-           if ($l =~ m/(.)\@\@/m || $l =~ m/^()\@\@/m) {
+           if ($l =~ m/^()\@\@/ || $l =~ m/([^\000])\@\@/) {
                ($to,$op,$esc,$l) = ($`,$1,$&,$');
                add_perl($to);
-               if ($op =~ m/[ 0-9a-zA-Z_\;\)\}?]/ || $op eq '') {
+               if ($op =~ m/[ \t\n0-9a-zA-Z_\;\)\}?]/ || $op eq '') {
                    $top= pop @oplist;
                    if (!@oplist) {
                        # And evaluate.