summaryrefslogtreecommitdiff
path: root/t/op/ord.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/ord.t')
-rw-r--r--t/op/ord.t14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/op/ord.t b/t/op/ord.t
new file mode 100644
index 0000000000..d95824f731
--- /dev/null
+++ b/t/op/ord.t
@@ -0,0 +1,14 @@
+#!./perl
+
+# $Header: ord.t,v 4.0 91/03/20 01:53:50 lwall Locked $
+
+print "1..2\n";
+
+# compile time evaluation
+
+if (ord('A') == 65) {print "ok 1\n";} else {print "not ok 1\n";}
+
+# run time evaluation
+
+$x = 'ABC';
+if (ord($x) == 65) {print "ok 2\n";} else {print "not ok 2\n";}