1N/A# delete() on hash elements 1N/Aif ($foo eq 'b') {
print "ok 1\n";}
else {
print "not ok 1 $foo\n";}
1N/Aif ($foo{1} eq 'a') {
print "ok 3\n";}
else {
print "not ok 3\n";}
1N/Aif ($foo{3} eq 'c') {
print "ok 4\n";}
else {
print "not ok 4\n";}
1N/Aif ($foo{4} eq 'd') {
print "ok 5\n";}
else {
print "not ok 5\n";}
1N/Aif ($foo{5} eq 'e') {
print "ok 6\n";}
else {
print "not ok 6\n";}
1N/Aif (@foo == 2) {
print "ok 7\n";}
else {
print "not ok 7 ", @
foo+
0,
"\n";}
1N/Aif ($foo[0] eq 'd') {
print "ok 8\n";}
else {
print "not ok 8 ",
$foo[
0],
"\n";}
1N/Aif ($foo[1] eq 'e') {
print "ok 9\n";}
else {
print "not ok 9 ",
$foo[
1],
"\n";}
1N/Aif ($foo{1} eq 'a') {
print "ok 12\n";}
else {
print "not ok 12\n";}
1N/Aif ($foo{3} eq 'c') {
print "ok 13\n";}
else {
print "not ok 13\n";}
1N/Aif ($foo eq 'ac' || $foo eq 'ca') {
print "ok 14\n";}
else {
print "not ok 14\n";}
1N/Aprint "@list" eq "foo" ?
"ok 16\n" :
"not ok 16 @list\n";
1N/A my %a = ('bar', 33); 1N/A# delete() on array elements 1N/Aif ($foo eq 'b') {
print "ok 18\n";}
else {
print "not ok 18 $foo\n";}
1N/Aif ($foo[1] eq 'a') {
print "ok 20\n";}
else {
print "not ok 20\n";}
1N/Aif ($foo[3] eq 'c') {
print "ok 21\n";}
else {
print "not ok 21\n";}
1N/Aif ($foo[4] eq 'd') {
print "ok 22\n";}
else {
print "not ok 22\n";}
1N/Aif ($foo[5] eq 'e') {
print "ok 23\n";}
else {
print "not ok 23\n";}
1N/Aif (@bar == 2) {
print "ok 24\n";}
else {
print "not ok 24 ", @
bar+
0,
"\n";}
1N/Aif ($bar[0] eq 'd') {
print "ok 25\n";}
else {
print "not ok 25 ",
$bar[
0],
"\n";}
1N/Aif ($bar[1] eq 'e') {
print "ok 26\n";}
else {
print "not ok 26 ",
$bar[
1],
"\n";}
1N/Aif ($foo[1] eq 'a') {
print "ok 29\n";}
else {
print "not ok 29\n";}
1N/Aif ($foo[3] eq 'c') {
print "ok 30\n";}
else {
print "not ok 30\n";}
1N/Aif ($foo eq 'ac') {
print "ok 31\n";}
else {
print "not ok 31\n";}
1N/Aif (@foo == 4) {
print "ok 32\n";}
else {
print "not ok 32\n";}
1N/Aif (@foo == 0) {
print "ok 33\n";}
else {
print "not ok 33\n";}
1N/Aprint +
($foo eq 'x y') ?
"ok 34\n" :
"not ok 34\n";
1N/Aprint @{
$refary[
0]} ==
1 ?
"ok 35\n" :
"not ok 35 @list\n";
1N/A # [perl #29127] scalar delete of empty slice returned garbage