# New Ticket Created by  Allison Randal 
# Please include the string:  [perl #24683]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=24683 >


This patch updates the following operators and their assignment
counterparts:

_ becomes ~ (concatenation)
& becomes +& ~& (bitwise AND, numeric and string)
| becomes +| ~| (bitwise OR, numeric and string)
~ becomes +^ ~^ (bitwise XOR, numeric and string)

Unary +^ (bitwise negation, a.k.a. ones complement) is not implemented
yet.

I've added two test files, bitwise.t and concat.t, which go in t/op/
(the op/ directory doesn't exist yet).

(My code for bitwise string operators was greatly simplified when Leo
implemented the bitwise_xors, bitwise_ands, and bitwise_ors (string
versions) vtable functions for PerlString. Hip-hip-hooray!)

Allison
Index: languages/perl6/P6C/Addcontext.pm
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/P6C/Addcontext.pm,v
retrieving revision 1.21
diff -u -r1.21 Addcontext.pm
--- languages/perl6/P6C/Addcontext.pm   27 Nov 2003 19:43:20 -0000      1.21
+++ languages/perl6/P6C/Addcontext.pm   17 Dec 2003 01:07:07 -0000
@@ -40,13 +40,13 @@
     # type => [list-of-ops].
     my %opmap =
        ( # Ops that work differently for different scalar types:
-        PerlUndef => [ qw(| & ~ // ..),
+        PerlUndef => [ qw(| & +^ ~^ // ..),
          # Unfortunately, these work differently on ints and nums:
                        qw(+ - * / % **)],
 
         PerlInt => [ qw(<< >>) ],
 
-        PerlString => [ qw(_) ],
+        PerlString => [ qw(~) ],
 
         # NOTE: Actually, according to apo 3, boolean operators
         # propagate values in their surrounding context (even though
@@ -900,7 +900,7 @@
                              @ PerlArray
                               * PerlArray
                              $ PerlUndef
-                             _ PerlString
+                             ~ PerlString
                              ? bool
                              + PerlNum);
 }
Index: languages/perl6/P6C/IMCC.pm
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/P6C/IMCC.pm,v
retrieving revision 1.30
diff -u -r1.30 IMCC.pm
--- languages/perl6/P6C/IMCC.pm 27 Nov 2003 19:43:20 -0000      1.30
+++ languages/perl6/P6C/IMCC.pm 17 Dec 2003 01:07:11 -0000
@@ -1341,16 +1341,6 @@
 use P6C::Util ':all';
 use P6C::Context;
 
-# Create generic code for $a op $b.
-sub simple_binary {
-    my $x = shift;
-    my $ltmp = $x->l->val;
-    my $rtmp = $x->r->val;
-    my $dest = newtmp 'PerlUndef';
-    my $op = imcc_op($x->op);
-    code("\t$dest = $ltmp $op $rtmp\n");
-    return $dest;
-}
 
 # '=' assignment op.
 sub do_assign {
@@ -1392,12 +1382,14 @@
 
  '>>'  => \&simple_binary,
  '<<'  => \&simple_binary,
- '|'   => \&simple_binary,
- '&'   => \&simple_binary,
- '~'   => \&simple_binary,
+ '+&'  => \&simple_binary,
+ '~&'  => \&simple_binary_pasm,
+ '+|'  => \&simple_binary,
+ '~|'  => \&simple_binary_pasm,
+ '+^'  => \&simple_binary,
+ '~^'  => \&simple_binary_pasm,
 
-# '_' => \&simple_binary, # PMC concat broken.
- '_'   => \&do_concat,
+ '~'   => \&do_concat,
  '='   => \&do_assign,
  '||'  => \&do_logor,
  '&&'  => \&do_logand,
@@ -1413,7 +1405,7 @@
 
 use vars '%op_is_array';
 BEGIN {
-    my @arrayops = qw(= .. x // ^^ && || _);
+    my @arrayops = qw(= .. x // ^^ && || ~);
     push(@arrayops, ',');
     @[EMAIL PROTECTED] = (1) x @arrayops;
 }
Index: languages/perl6/P6C/Parser.pm
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/P6C/Parser.pm,v
retrieving revision 1.28
diff -u -r1.28 Parser.pm
--- languages/perl6/P6C/Parser.pm       27 Nov 2003 19:43:20 -0000      1.28
+++ languages/perl6/P6C/Parser.pm       17 Dec 2003 01:07:13 -0000
@@ -251,22 +251,23 @@
     $VCLOSE    = qr/<</;
     $NAMEPART  = qr/[a-zA-Z_][\w_]*/;
     $COMPARE   = qr{(?:cmp|eq|[gnl]e|[gl]t)\b|<=>|[<>=!]=|<|>};
-    $CONTEXT   = [EMAIL PROTECTED]&*_?]|\+(?!\+)};
+    $CONTEXT   = [EMAIL PROTECTED]&*?]|\+(?!\+)|~(?![~\&\|\^])};
     $MULDIV    = qr{[\%*x]|/(?!/)};
     $MATCH     = qr{[=!]~};
     $INCR      = qr{\+\+|--};
-    $PREFIX    = qr{ [!~\\]   |    # logical negation '!', bitwise negation '~', 
create a reference '\'
+    $PREFIX    = qr{ [!\\]    |    # logical negation '!', create a reference '\'
+                      \+\^     |    # unary bitwise XOR (bitwise negation)
                       \+(?!\+) |    # posification '+', but not increment '++' 
                       -(?![->])     # negation '-', but not decrement '--', but not 
dereference '->'
                     }x;
-    $ADDSUB    = qr{[-+_]};
+    $ADDSUB    = qr{[-+~](?![\&\|\^])};
     $BITSHIFT  = qr{<<|>>};
     $LOG_OR    = qr{(?:x?or|err)\b};
     $LOGOR     = qr{\|\||\^\^|//};
-    $BITOR     = qr{(?:\|(?!\|)|~(?!~))};
-    $BITAND    = qr{&(?!&)};
+    $BITOR     = qr{(?:\|(?!\|)|[~\+][\|\^])};
+    $BITAND    = qr{(?:\+\&|~\&)};
     $FILETEST  = qr{-[rwxoRWXOezsfdlpSbctugkTBMAC]+\b};
-    $ASSIGN    = qr{(?:!|:|//|&&?|\|\|?|~|\^\^|<<|>>|$ADDSUB|$MULDIV|\*\*)?=};
+    $ASSIGN    = 
qr{(?:!|:|//|&&?|\|\|?|\+[\&\|\^]|~[\&\|\^]|\^\^|<<|>>|$ADDSUB|$MULDIV|\*\*)?=};
     # Used for flushing syntax errors
     $FLUSH     = qr/\w+|[^\s\w;}#'"]+/;
     $NUMPART   = qr/(?!_)[\d_]+(?<!_)/;
@@ -523,7 +524,7 @@
 muldiv_op:       /$MULDIV|$VOPEN$MULDIV$VCLOSE/o
 
 addsub:                  <leftop: muldiv addsub_op muldiv>
-# addsub_op:     '+' | '-' | '_'
+# addsub_op:     '+' | '-' | '~'
 addsub_op:       /$ADDSUB|$VOPEN$ADDSUB$VCLOSE/o
 
 bitshift:        <leftop: addsub bitshift_op addsub>
Index: languages/perl6/P6C/IMCC/Binop.pm
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/P6C/IMCC/Binop.pm,v
retrieving revision 1.14
diff -u -r1.14 Binop.pm
--- languages/perl6/P6C/IMCC/Binop.pm   27 Nov 2003 19:43:22 -0000      1.14
+++ languages/perl6/P6C/IMCC/Binop.pm   17 Dec 2003 01:07:14 -0000
@@ -10,7 +10,7 @@
 use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK);
 @ISA = qw(Exporter);
 @EXPORT_OK = qw(do_pow do_logand do_logor do_defined do_concat do_repeat
-               do_range do_smartmatch imcc_op);
+               do_range do_smartmatch imcc_op simple_binary simple_binary_pasm);
 %EXPORT_TAGS = (all => [EMAIL PROTECTED]);
 
 sub do_pow ;
@@ -28,14 +28,49 @@
 sub sm_expr_num ;
 sub sm_expr_str ;
 
-# Remap operator names from P6 to IMCC.
+# Remap operator symbols from P6 to IMCC.
 sub imcc_op {
        my $op = shift;
-
        return "~~" if ($op eq '^^');
-       return "." if ($op eq '_');
+       return "."  if ($op eq '~');
+       return "|"  if ($op eq '+|');
+       return "&"  if ($op eq '+&');
+       return "~"  if ($op eq '+^');
+       return $op;
+}
 
+# Remap operator symbols from P6 to PASM opcodes
+sub pasm_op {
+       my $op = shift;
+       return "bands" if ($op eq '~&');
+       return "bors"  if ($op eq '~|');
+       return "bxors" if ($op eq '~^');
        return $op;
+}
+
+#
+# Create generic code for $a op $b.
+sub simple_binary {
+    my $x = shift;
+    my $ltmp = $x->l->val;
+    my $rtmp = $x->r->val;
+    my $dest = newtmp 'PerlUndef';
+    my $op = imcc_op($x->op);
+    code("\t$dest = $ltmp $op $rtmp\n");
+    return $dest;
+}
+
+#
+# Some p6 operators correspond to a single PASM opcode but don't
+# have PIR syntax.
+sub simple_binary_pasm {
+    my $x = shift;
+    my $dest = newtmp 'PerlUndef';
+    my $ltmp = $x->l->val;
+    my $rtmp = $x->r->val;
+    my $opcode = pasm_op($x->op);
+    code("\t$opcode $dest, $ltmp, $rtmp\n");
+    return $dest;
 }
 
 1;
Index: languages/perl6/P6C/IMCC/hype.pm
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/P6C/IMCC/hype.pm,v
retrieving revision 1.5
diff -u -r1.5 hype.pm
--- languages/perl6/P6C/IMCC/hype.pm    27 Nov 2003 19:43:22 -0000      1.5
+++ languages/perl6/P6C/IMCC/hype.pm    17 Dec 2003 01:07:14 -0000
@@ -21,9 +21,9 @@
 
 use vars '%optype';
 BEGIN {
-    my %opmap = (int => [ qw(>> << | & ~ ^^)],
+    my %opmap = (int => [ qw(>> << +| +& +^ ^^)],
                 num => [ qw(+ - * / % **)],
-                str => [ qw(_) ]);
+                str => [ qw(~ ~| ~& ~^) ]);
     while (my ($t, $ops) = each %opmap) {
        @[EMAIL PROTECTED] = ($t) x @$ops;
     }
@@ -120,7 +120,7 @@
        return hype_scalar_array(@_);
     } else {
        diag "Tried to hyper-operate two scalars";
-       return P6C::Binop::simple_binary(@_);
+       return P6C::IMCC::Binop::simple_binary(@_);
     }
 }
 
Index: languages/perl6/P6C/Tree/String.pm
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/P6C/Tree/String.pm,v
retrieving revision 1.8
diff -u -r1.8 String.pm
--- languages/perl6/P6C/Tree/String.pm  13 Oct 2003 17:00:52 -0000      1.8
+++ languages/perl6/P6C/Tree/String.pm  17 Dec 2003 01:07:15 -0000
@@ -153,9 +153,10 @@
     my ($list) = @_;
     my $type = 'PerlString';
     if (@$list > 1) {
-        my $val = new P6C::Binop op => '_', l => make_node(shift @$list), r => 
make_node(shift @$list);
+       # XXX: hardcoded P6 op, nasty
+        my $val = new P6C::Binop op => '~', l => make_node(shift @$list), r => 
make_node(shift @$list);
         while (@$list) {
-            $val = new P6C::Binop op => '_', l => $val, r => make_node(shift @$list)
+            $val = new P6C::Binop op => '~', l => $val, r => make_node(shift @$list)
         }
         return $val;
     }
Index: languages/perl6/examples/qsort.p6
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/examples/qsort.p6,v
retrieving revision 1.2
diff -u -r1.2 qsort.p6
--- languages/perl6/examples/qsort.p6   18 Feb 2003 13:25:13 -0000      1.2
+++ languages/perl6/examples/qsort.p6   17 Dec 2003 01:07:15 -0000
@@ -21,8 +21,8 @@
 sub main() {
     my @a = 1..(@ARGS[0] || 100);
     qsort @a, 0, @a - 1;
-    print @a ^_ "\n";
+    print @a >>~<< "\n";
     @a = reverse @a;
     qsort @a, 0, @a - 1;
-    print @a ^_ "\n";
+    print @a >>~<< "\n";
 }
Index: languages/perl6/t/compiler/aggregates.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/aggregates.t,v
retrieving revision 1.1
diff -u -r1.1 aggregates.t
--- languages/perl6/t/compiler/aggregates.t     13 Oct 2003 17:00:57 -0000      1.1
+++ languages/perl6/t/compiler/aggregates.t     17 Dec 2003 01:07:15 -0000
@@ -9,7 +9,7 @@
     my $a = (2,3,4);
     my ($b, $c) = (2,3,4);
     my ($d, $e, $f) = (5,6);
-    print1(@a[0] _ ' ' _ @a[1] _ ' ' _ @a[2]);
+    print1(@a[0] ~ ' ' ~ @a[1] ~ ' ' ~ @a[2]);
     print1($a);
     print1($b);
     print1($c);
@@ -33,9 +33,9 @@
 sub main() {
     my @a = (1,2,3,4);
     my @b = @a[0,2];
-    print1(@b[0] _ ', ' _ @b[1]);
-    print1(@a[0] _ ', ' _ @a[2]);
-    print1(@a[1] _ ', ' _ @a[3]);
+    print1(@b[0] ~ ', ' ~ @b[1]);
+    print1(@a[0] ~ ', ' ~ @a[2]);
+    print1(@a[1] ~ ', ' ~ @a[3]);
     my @c = @a;
     @a[2] = 5;
     @c[0] = 6;
@@ -58,7 +58,7 @@
     %x{a} = 'ay?';
     %x{b} = 'be!';
     %x{$x} = 'twenty-three';
-    print1(%x{a} _', ' _%x{$b} _', ' _%x{23});
+    print1(%x{a} ~', ' ~%x{$b} ~', ' ~%x{23});
 }
 
 CODE
@@ -75,7 +75,7 @@
     %x{b} = 'be!';
     %x{$x} = 'twenty-three';
     my @x = %x{'b', 'a', $x};
-    print1(@x[0] [EMAIL PROTECTED] [EMAIL PROTECTED]);
+    print1(@x[0] [EMAIL PROTECTED] [EMAIL PROTECTED]);
     my %y = %x;
     %y{a} = 'ay!';
     %x{b} = 'be?';
@@ -92,7 +92,7 @@
 ##############################
 output_is(<<'CODE', <<'OUT', "Flattening");
 sub foo {
-    print1(@_[0]_' '[EMAIL PROTECTED]);
+    print1(@_[0]~' '[EMAIL PROTECTED]);
 }
 
 sub main() {
@@ -137,9 +137,9 @@
     my @b = @[EMAIL PROTECTED];
     my @c = @a[1..3];
     my ($d, $e) = @a[1..3];
-    print1(@b[0] _ ' ' _ @b[1] _ ' ' _ @b[2]);
-    print1(@c[0] _ ' ' _ @c[1] _ ' ' _ @c[2]);
-    print1($d _ ' ' _ $e);
+    print1(@b[0] ~ ' ' ~ @b[1] ~ ' ' ~ @b[2]);
+    print1(@c[0] ~ ' ' ~ @c[1] ~ ' ' ~ @c[2]);
+    print1($d ~ ' ' ~ $e);
 }
 
 CODE
Index: languages/perl6/t/compiler/basic.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/basic.t,v
retrieving revision 1.2
diff -u -r1.2 basic.t
--- languages/perl6/t/compiler/basic.t  27 Nov 2003 19:43:25 -0000      1.2
+++ languages/perl6/t/compiler/basic.t  17 Dec 2003 01:07:15 -0000
@@ -6,7 +6,7 @@
 ##############################
 output_is(<<'CODE', <<'OUT', "Basic hello.");
 sub main() {
-    print1("Hello, " _ "world");
+    print1("Hello, " ~ "world");
 }
 CODE
 Hello, world
@@ -37,7 +37,7 @@
     print1(2 * 3);
     print1(6 / 2);
     print1(2 % 3);
-    print1(2 _ 3);
+    print1(2 ~ 3);
     print1(2 ** 3);
     print1(2 ** 3 ** 1);
     print1(2 ** 1 ** 3);
@@ -65,7 +65,7 @@
     print1 "ok 3" if (--$x == 2);
     my $y = $x++;
     print1 "ok 4" if ($x == 3 && $y == 2);
-    print1 ("ok "_ ($x++ + $y++));
+    print1 ("ok "~ ($x++ + $y++));
     print1 "ok 6" if ($x == 4 && $y == 3);
 }
 CODE
@@ -84,15 +84,15 @@
     my $y = $x;
     my @z = ($x, $y);
     # actually above statement makes next fail -lt
-    print1 (++$x _ ' ' _ $y);
+    print1 (++$x ~ ' ' ~ $y);
     $x--;
-    print ++$x _ ' ' _ $y _ "\n";
-    print $x++ _ ' ' _ $y _ "\n";
-    print $x _ ' ' _ $y++ _ "\n";
-    print $x _ ' ' _ ++$y _ "\n";
-    print @z[0]++ _ ' ' _ [EMAIL PROTECTED] _ "\n";
-    print $x _ ' ' _ $y _ "\n";
-    print @z[0] _ ' ' _ @z[1] _ "\n";
+    print ++$x ~ ' ' ~ $y ~ "\n";
+    print $x++ ~ ' ' ~ $y ~ "\n";
+    print $x ~ ' ' ~ $y++ ~ "\n";
+    print $x ~ ' ' ~ ++$y ~ "\n";
+    print @z[0]++ ~ ' ' ~ [EMAIL PROTECTED] ~ "\n";
+    print $x ~ ' ' ~ $y ~ "\n";
+    print @z[0] ~ ' ' ~ @z[1] ~ "\n";
 }
 CODE
 3 2
@@ -110,9 +110,9 @@
 sub main() {
     print1(2 << 3);
     print1(32 >> 3);
-    print1(32 | 3);
-    print1(31 & 3);
-    print1(10 ~ 12);           # 1010 ~ 1100 -> 0110 == 6
+    print1(32 +| 3);
+    print1(31 +& 3);
+    print1(10 +^ 12);          # 1010 +^ 1100 -> 0110 == 6
 }
 CODE
 16
@@ -256,19 +256,19 @@
     my $a = 3;
     if 1 {
        my $a = 4;
-       if 2 { my $a = 5; print1("a is " _ $a) }
-       print1("a is " _ $a);
+       if 2 { my $a = 5; print1("a is " ~ $a) }
+       print1("a is " ~ $a);
     }
-    print1("a is " _ $a);
+    print1("a is " ~ $a);
     if 1 {
        my $a = 5;
-       print1("a is " _ $a);
+       print1("a is " ~ $a);
     }
-    print1("a is " _ $a);
+    print1("a is " ~ $a);
     if 1 {
        $a = 6;
     }
-    print1("a is " _ $a);
+    print1("a is " ~ $a);
 }
 CODE
 a is 5
Index: languages/perl6/t/compiler/call.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/call.t,v
retrieving revision 1.1
diff -u -r1.1 call.t
--- languages/perl6/t/compiler/call.t   13 Oct 2003 17:00:57 -0000      1.1
+++ languages/perl6/t/compiler/call.t   17 Dec 2003 01:07:16 -0000
@@ -7,7 +7,7 @@
 output_is(<<'CODE', <<'OUT', "subroutine call");
 sub _fact($tot, $max, $n) {
     if $n > $max {
-       print1($max _ "! = " _ $tot);
+       print1($max ~ "! = " ~ $tot);
     } else {
        _fact $tot * $n, $max, $n + 1;
     }
@@ -15,7 +15,7 @@
 
 sub fact($n) {
     unless 0 <= $n < 20 {
-       print1("Sorry, can't take " _ $n _ " factorial");
+       print1("Sorry, can't take " ~ $n ~ " factorial");
     } else {
        _fact 1, $n, 1
     }
@@ -38,7 +38,7 @@
 ##############################
 output_is(<<'CODE', <<'OUT', "no args");
 sub noargs() {
-    print "ok " _ $i++ _ "\n";
+    print "ok " ~ $i++ ~ "\n";
 }
 
 sub main() {
@@ -62,7 +62,7 @@
 }
 
 sub noargs() {
-    print "ok " _ $i++ _ "\n";
+    print "ok " ~ $i++ ~ "\n";
 }
 
 CODE
@@ -288,15 +288,15 @@
 }
 
 sub one($x) {
-    print1('one ' _$x);
+    print1('one ' ~$x);
 }
 
 sub two($x, $y) {
-    print1('two ' _$x _' ' _$y);
+    print1('two ' ~$x ~' ' ~$y);
 }
 
 sub three($x, $y, $z) {
-    print1('three ' _$x _' ' _$y _' ' _$z);
+    print1('three ' ~$x ~' ' ~$y ~' ' ~$z);
 }
 
 sub main() {
Index: languages/perl6/t/compiler/exceptions.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/exceptions.t,v
retrieving revision 1.1
diff -u -r1.1 exceptions.t
--- languages/perl6/t/compiler/exceptions.t     13 Oct 2003 17:00:57 -0000      1.1
+++ languages/perl6/t/compiler/exceptions.t     17 Dec 2003 01:07:16 -0000
@@ -18,7 +18,7 @@
        die;
        CATCH { default { 2 } }
     }
-    print $x _' ' _$y, "\n";
+    print $x ~' ' ~$y, "\n";
 }
 CODE
 dying
Index: languages/perl6/t/compiler/for.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/for.t,v
retrieving revision 1.1
diff -u -r1.1 for.t
--- languages/perl6/t/compiler/for.t    13 Oct 2003 17:00:57 -0000      1.1
+++ languages/perl6/t/compiler/for.t    17 Dec 2003 01:07:16 -0000
@@ -78,7 +78,7 @@
 output_is(<<'CODE', <<'OUT', "For 1;1 -> 2;3");
 sub main() {
     for 11..20 ; 1..15 -> $a, $b ; $c, $d, $e {
-       print1($a _ ' ' _ $c);
+       print1($a ~ ' ' ~ $c);
     }
 }
 
Index: languages/perl6/t/compiler/globals.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/globals.t,v
retrieving revision 1.2
diff -u -r1.2 globals.t
--- languages/perl6/t/compiler/globals.t        27 Nov 2003 19:43:25 -0000      1.2
+++ languages/perl6/t/compiler/globals.t        17 Dec 2003 01:07:16 -0000
@@ -6,7 +6,7 @@
 ##############################
 output_is(<<'CODE', <<'OUT', "globals");
 sub foo() {
-    print $x, " is ", @xs >>_<< ' ', "\n";
+    print $x, " is ", @xs >>~<< ' ', "\n";
     $y = 0;
     for @xs { $y = $y + $_ }
 }
Index: languages/perl6/t/compiler/hyper.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/hyper.t,v
retrieving revision 1.3
diff -u -r1.3 hyper.t
--- languages/perl6/t/compiler/hyper.t  27 Nov 2003 19:43:25 -0000      1.3
+++ languages/perl6/t/compiler/hyper.t  17 Dec 2003 01:07:16 -0000
@@ -6,7 +6,7 @@
 ##############################
 output_is(<<'CODE', <<'OUT', 'Hyper 1');
 sub parray(@y) {
-    print1('(' _ @y[0] _ ', ' _ @y[1] _ ')');
+    print1('(' ~ @y[0] ~ ', ' ~ @y[1] ~ ')');
 }
 sub main() {
     my @a = (1,2);
@@ -20,7 +20,7 @@
 #    print1(@a >>*<< @x  + @b); # Array math not in 0.0.7
 # IMCC clobbers too many registers with this:
 #     @y = @a >><<<< @a;
-#     print1('(' _ @y[0] _ ', ' _ @y[1] _ ')');
+#     print1('(' ~ @y[0] ~ ', ' ~ @y[1] ~ ')');
 }
 CODE
 (8, 14)
@@ -51,7 +51,7 @@
 ##############################
 output_is(<<'CODE', <<'OUT', 'Hyper 3');
 sub parray(@y) {
-    print1('(' _ @y[0] _ ', ' _ @y[1] _ ', ' _ @y[2] _ ')');
+    print1('(' ~ @y[0] ~ ', ' ~ @y[1] ~ ', ' ~ @y[2] ~ ')');
 }
 
 sub main() {
@@ -82,17 +82,17 @@
     my @a = (1..3);
     my @b = (4..9);
     my @c = @a >>+<< @b;
-    print @c >>_<< ' ',"x\n";
+    print @c >>~<< ' ',"x\n";
     @c = @b >>+<< @a;
-    print @c >>_<< ' ',"x\n";
+    print @c >>~<< ' ',"x\n";
     @b = @b >>+<< @a;
-    print @b >>_<< ' ',"x\n";
+    print @b >>~<< ' ',"x\n";
     @b = (4..9);
     @b >>+=<< @a;
-    print @b >>_<< ' ',"x\n";
+    print @b >>~<< ' ',"x\n";
     @b = (4..9);
     @a >>+=<< @b;
-    print @a >>_<< ' ',"x\n";
+    print @a >>~<< ' ',"x\n";
 }
 CODE
 5 7 9 7 8 9 x
@@ -109,30 +109,30 @@
 my @c;
 @c = @a;
 @c >>+=<< @b;
-print @c >>_<< ' ',"x\n";
+print @c >>~<< ' ',"x\n";
 @c = @b;
 @c >>+=<< @a;
-print @c >>_<< ' ',"x\n";
+print @c >>~<< ' ',"x\n";
 
 @c = @a;
 @c >>*=<< @b;
-print @c >>_<< ' ',"x\n";
+print @c >>~<< ' ',"x\n";
 
 @c = @a;
 @c >>**=<< @b;
-print @c >>_<< ' ',"x\n";
+print @c >>~<< ' ',"x\n";
 
 @c = @a;
 @c >>/=<< @b;
-print @c >>_<< ' ',"x\n";
+print @c >>~<< ' ',"x\n";
 
 @c = @b;
 @c >>%=<< @a;
-print @c >>_<< ' ',"x\n";
+print @c >>~<< ' ',"x\n";
 
 @c = @b;
 @c >>-=<< @a;
-print @c >>_<< ' ',"x\n";
+print @c >>~<< ' ',"x\n";
 CODE
 /7 9 4 x
 7 9 4 x
Index: languages/perl6/t/compiler/qsort.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/qsort.t,v
retrieving revision 1.2
diff -u -r1.2 qsort.t
--- languages/perl6/t/compiler/qsort.t  27 Nov 2003 19:43:25 -0000      1.2
+++ languages/perl6/t/compiler/qsort.t  17 Dec 2003 01:07:16 -0000
@@ -27,10 +27,10 @@
 sub main() {
     my @a = 1..10;
     qsort @a, 0, @a - 1;
-    print @a >>_<< "\n";
+    print @a >>~<< "\n";
     @a = (10,9,8,7,6,5,4,3,2,1);
     qsort @a, 0, @a - 1;
-    print @a >>_<< "\n";
+    print @a >>~<< "\n";
 }
 CODE
 10
Index: languages/perl6/t/compiler/string.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/string.t,v
retrieving revision 1.1
diff -u -r1.1 string.t
--- languages/perl6/t/compiler/string.t 13 Oct 2003 17:00:57 -0000      1.1
+++ languages/perl6/t/compiler/string.t 17 Dec 2003 01:07:16 -0000
@@ -12,7 +12,7 @@
     # qq + interpolation
     print(qq|$speech $action $person\n"But you speak like a fool."\n|);
     # obviously refering to those folks who think Perl6 is a "bad thing." :)
-    print "\"pass " _ 'test"' _ "\n"; # backslash quotes + spacing
+    print "\"pass " ~ 'test"' ~ "\n"; # backslash quotes + spacing
 }
 CODE
 "You have not seen, so I forgive your jest," said Gimli.

Reply via email to