Name
ord
Synopsis
ord expr
Returns the numeric ASCII value of the first
character of expr
. If
expr is omitted, it uses $_
. The return value is always unsigned.
If you want a signed value, use unpack('c'
,
expr
)
. If you want all the characters of the
string converted to a list of numbers, use unpack('C*'
,
expr
)
instead.
Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.