summaryrefslogtreecommitdiff
path: root/pod/perlfunc.pod
diff options
context:
space:
mode:
authorZsbán Ambrus <ambrus@math.bme.hu>2010-12-26 18:10:57 -0800
committerFather Chrysostomos <sprout@cpan.org>2010-12-26 18:10:57 -0800
commit6fae7aa4cab68dd6bb59af7f22c85e77eb8a1b0c (patch)
tree7ef71adf5eec929b91a18bbc89f8a4fb9084248d /pod/perlfunc.pod
parent23e2fda90bc3d33c854bd36de712a45aca7a7711 (diff)
downloadperl-6fae7aa4cab68dd6bb59af7f22c85e77eb8a1b0c.tar.gz
[perl #81016] Document ord("")
The following patch clarifies what ord("") does in pod/perlfunc.pod. From the current documentation, it's not documented what it does, and one could guess several different things: returns zero, returns undef, returns zero with a warning, returns undef with a warning, dies. (There's precedent for dying: some BASIC implementations give an error if you ask for ASC("") -- here ASC is their equivalent of our ord function.)
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r--pod/perlfunc.pod4
1 files changed, 2 insertions, 2 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 806710fac5..f1df33c621 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -3602,8 +3602,8 @@ X<ord> X<encoding>
=item ord
Returns the numeric (the native 8-bit encoding, like ASCII or EBCDIC,
-or Unicode) value of the first character of EXPR. If EXPR is omitted,
-uses C<$_>.
+or Unicode) value of the first character of EXPR. If EXPR is an empty
+string, returns 0. If EXPR is omitted, uses C<$_>.
For the reverse, see L</chr>.
See L<perlunicode> for more about Unicode.