This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Exact path to perl for open -|.
[perl5.git] / t / op / ord.t
1 #!./perl
2
3 print "1..3\n";
4
5 # compile time evaluation
6
7 # 65    ASCII
8 # 193   EBCDIC
9 if (ord('A') == 65 || ord('A') == 193) {print "ok 1\n";} else {print "not ok 1\n";}
10
11 # run time evaluation
12
13 $x = 'ABC';
14 if (ord($x) == 65 || ord($x) == 193) {print "ok 2\n";} else {print "not ok 2\n";}
15
16 if (chr 65 == 'A' || chr 193 == 'A') {print "ok 3\n";} else {print "not ok 3\n";}