perl 1.0 patch 1: Portability bugs and one possible SIGSEGV
[p5sagit/p5-mst-13.2.git] / t / cmd.for
CommitLineData
8d063cd8 1#!./perl
2
3# $Header: cmd.for,v 1.0 87/12/18 13:12:05 root Exp $
4
5print "1..2\n";
6
7for ($i = 0; $i <= 10; $i++) {
8 $x[$i] = $i;
9}
10$y = $x[10];
11print "#1 :$y: eq :10:\n";
12$y = join(' ', @x);
13print "#1 :$y: eq :0 1 2 3 4 5 6 7 8 9 10:\n";
14if (join(' ', @x) eq '0 1 2 3 4 5 6 7 8 9 10') {
15 print "ok 1\n";
16} else {
17 print "not ok 1\n";
18}
19
20$i = $c = 0;
21for (;;) {
22 $c++;
23 last if $i++ > 10;
24}
25if ($c == 12) {print "ok 2\n";} else {print "not ok 2\n";}