Commit | Line | Data |
---|---|---|
8d063cd8 | 1 | #!./perl |
2 | ||
463ee0b2 | 3 | print "1..3\n"; |
8d063cd8 | 4 | |
5 | # compile time evaluation | |
6 | ||
9d116dd7 | 7 | # 65 ASCII |
8 | # 193 EBCDIC | |
9 | if (ord('A') == 65 || ord('A') == 193) {print "ok 1\n";} else {print "not ok 1\n";} | |
8d063cd8 | 10 | |
11 | # run time evaluation | |
12 | ||
13 | $x = 'ABC'; | |
9d116dd7 | 14 | if (ord($x) == 65 || ord($x) == 193) {print "ok 2\n";} else {print "not ok 2\n";} |
463ee0b2 | 15 | |
9d116dd7 | 16 | if (chr 65 == 'A' || chr 193 == 'A') {print "ok 3\n";} else {print "not ok 3\n";} |