diff options
author | Zsbán Ambrus <ambrus@math.bme.hu> | 2010-12-26 18:10:57 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-12-26 18:10:57 -0800 |
commit | 6fae7aa4cab68dd6bb59af7f22c85e77eb8a1b0c (patch) | |
tree | 7ef71adf5eec929b91a18bbc89f8a4fb9084248d /pod/perlfunc.pod | |
parent | 23e2fda90bc3d33c854bd36de712a45aca7a7711 (diff) | |
download | perl-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.pod | 4 |
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. |