a "replacement" for awk and sed
[p5sagit/p5-mst-13.2.git] / t / cmd.for
1 #!./perl
2
3 # $Header: cmd.for,v 1.0 87/12/18 13:12:05 root Exp $
4
5 print "1..2\n";
6
7 for ($i = 0; $i <= 10; $i++) {
8     $x[$i] = $i;
9 }
10 $y = $x[10];
11 print "#1       :$y: eq :10:\n";
12 $y = join(' ', @x);
13 print "#1       :$y: eq :0 1 2 3 4 5 6 7 8 9 10:\n";
14 if (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;
21 for (;;) {
22         $c++;
23         last if $i++ > 10;
24 }
25 if ($c == 12) {print "ok 2\n";} else {print "not ok 2\n";}