Skip to content
Newer
Older
100644 50 lines (41 sloc) 696 Bytes
11e6f96 @allisonrandal [punie] Migrating Punie into 'languages' repository from
allisonrandal authored Feb 27, 2009
1 print 1;
2 print 2, "\n";
3 print 34, "\n";
4 print 5.6, "\n";
5 print 'ok 7\n', "\n"; # show '\n' is literal
6 print "ok 8\n";
7 print "ok 9\n","ok 10\n","ok 11\n","ok 12\n";
8 label1: print "ok 13\n";
9 label2: print "ok 14\n";
10 print 1 - 2 - 3;
11 print "\n";
12 print 1 + 2, "\n", 2 + 3, "\n";
13
14 do {
15 print "ok 15\n";
16 print "ok 16\n";
17 print "ok 17\n";
18 };
19
20 if (1) {
21 print "ok 18\n";
22 }
23 if (0) {
24 print "should never be printed\n";
25 }
26 unless (1 - 1) {
27 print "ok 19\n";
28 }
29 unless (1) {
30 print "should never be printed\n";
31 }
32
33 # comment
34
35 $x = 4;
36
37 if ($x >= 4) {
38 print "ok 20\n";
39 }
40 if ($x <= 5) {
41 print "ok 21\n";
42 }
43
44
45 $y = 1 + 1 && 11 + 11;
46 print "ok ", $y, "\n";
47
48 $z = 0 || 23;
49 print "ok ", $z, "\n";
Something went wrong with that request. Please try again.