Lines Matching refs:undef
101 # undef should be treated as 0 for numerical range
102 print join(":",undef..2) eq '0:1:2' ? "ok 20\n" : "not ok 20\n";
103 print join(":",-2..undef) eq '-2:-1:0' ? "ok 21\n" : "not ok 21\n";
104 print join(":",undef..'2') eq '0:1:2' ? "ok 22\n" : "not ok 22\n";
105 print join(":",'-2'..undef) eq '-2:-1:0' ? "ok 23\n" : "not ok 23\n";
107 # undef should be treated as "" for magical range
109 print join(":", map "[$_]", undef.."B") eq '[]' ? "ok 25\n" : "not ok 25\n";
111 print join(":", map "[$_]", "B"..undef) eq '' ? "ok 27\n" : "not ok 27\n";
113 # undef..undef used to segfault
114 print join(":", map "[$_]", undef..undef) eq '[]' ? "ok 28\n" : "not ok 28\n";
116 # also test undef in foreach loops
117 @foo=(); push @foo, $_ for undef..2;
120 @foo=(); push @foo, $_ for -2..undef;
123 @foo=(); push @foo, $_ for undef..'2';
126 @foo=(); push @foo, $_ for '-2'..undef;
129 @foo=(); push @foo, $_ for undef.."B";
135 @foo=(); push @foo, $_ for "B"..undef;
141 @foo=(); push @foo, $_ for undef..undef;