Perl Programming/Keywords/length
< Perl Programming | Keywords
The length
keywordEdit
length
is a function that returns how long the following expression is in terms of characters. If no EXPRESSION
is given, it returns the length of $_
. If the expression is undefined, undef
is returned.
As length returns the number of logical characters, to find out the number of bytes in UTF-8, one has to enter an expression (see below).
SyntaxEdit
length EXPRESSION