p4raw-id: //depot/perl@22775
SP = ORIGMARK;
else if (gimme == G_SCALAR) {
MARK = ORIGMARK;
- *++MARK = *SP;
+ if (SP > MARK)
+ *++MARK = *SP;
+ else
+ *++MARK = &PL_sv_undef;
SP = MARK;
}
}
#!./perl
-print "1..36\n";
+print "1..37\n";
# delete() on hash elements
print "not " unless $a == $b && $b == $c;
print "ok 36\n";
}
+
+{
+ # [perl #29127] scalar delete of empty slice returned garbage
+ my %h;
+ my ($x,$y) = (1, scalar delete @h{()});
+ print "not " if defined $y;
+ print "ok 37\n";
+}