[inseparable changes from patch from perl5.003_15 to perl5.003_16]
[p5sagit/p5-mst-13.2.git] / t / op / my.t
1 #!./perl
2
3 # $RCSfile: local.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:04 $
4
5 print "1..20\n";
6
7 sub foo {
8     my($a, $b) = @_;
9     my $c;
10     my $d;
11     $c = "ok 3\n";
12     $d = "ok 4\n";
13     { my($a,$c) = ("ok 9\n", "ok 10\n"); ($x, $y) = ($a, $c); }
14     print $a, $b;
15     $c . $d;
16 }
17
18 $a = "ok 5\n";
19 $b = "ok 6\n";
20 $c = "ok 7\n";
21 $d = "ok 8\n";
22
23 print &foo("ok 1\n","ok 2\n");
24
25 print $a,$b,$c,$d,$x,$y;
26
27 # same thing, only with arrays and associative arrays
28
29 sub foo2 {
30     my($a, @b) = @_;
31     my(@c, %d);
32     @c = "ok 13\n";
33     $d{''} = "ok 14\n";
34     { my($a,@c) = ("ok 19\n", "ok 20\n"); ($x, $y) = ($a, @c); }
35     print $a, @b;
36     $c[0] . $d{''};
37 }
38
39 $a = "ok 15\n";
40 @b = "ok 16\n";
41 @c = "ok 17\n";
42 $d{''} = "ok 18\n";
43
44 print &foo2("ok 11\n","ok 12\n");
45
46 print $a,@b,@c,%d,$x,$y;