11 $foo = delete $foo{2};
13 if ($foo eq 'b') {print "ok 1\n";} else {print "not ok 1 $foo\n";}
14 if ($foo{2} eq '') {print "ok 2\n";} else {print "not ok 2 $foo{2}\n";}
15 if ($foo{1} eq 'a') {print "ok 3\n";} else {print "not ok 3\n";}
16 if ($foo{3} eq 'c') {print "ok 4\n";} else {print "not ok 4\n";}
17 if ($foo{4} eq 'd') {print "ok 5\n";} else {print "not ok 5\n";}
18 if ($foo{5} eq 'e') {print "ok 6\n";} else {print "not ok 6\n";}
20 @foo = delete @foo{4, 5};
22 if (@foo == 2) {print "ok 7\n";} else {print "not ok 7 ", @foo+0, "\n";}
23 if ($foo[0] eq 'd') {print "ok 8\n";} else {print "not ok 8 ", $foo[0], "\n";}
24 if ($foo[1] eq 'e') {print "ok 9\n";} else {print "not ok 9 ", $foo[1], "\n";}
25 if ($foo{4} eq '') {print "ok 10\n";} else {print "not ok 10 $foo{4}\n";}
26 if ($foo{5} eq '') {print "ok 11\n";} else {print "not ok 11 $foo{5}\n";}
27 if ($foo{1} eq 'a') {print "ok 12\n";} else {print "not ok 12\n";}
28 if ($foo{3} eq 'c') {print "ok 13\n";} else {print "not ok 13\n";}
30 $foo = join('',values(%foo));
31 if ($foo eq 'ac' || $foo eq 'ca') {print "ok 14\n";} else {print "not ok 14\n";}
33 foreach $key (keys %foo) {
40 $foo = join('',values(%foo));
41 print +($foo eq 'xy' || $foo eq 'yx') ? "ok 15\n" : "not ok 15\n";
43 $refhash{"top"}->{"foo"} = "FOO";
44 $refhash{"top"}->{"bar"} = "BAR";
46 delete $refhash{"top"}->{"bar"};
47 @list = keys %{$refhash{"top"}};
49 print "@list" eq "foo" ? "ok 16\n" : "not ok 16 @list\n";
53 my($a) = \(values %a);
55 my $c = \delete $a{bar};
57 print "not " unless $a == $b && $b == $c;