The Wayback Machine - https://web.archive.org/web/20151224113751/http://perldoc.perl.org:80/functions/length.html

Perl version

Modules

  • ABCDE
  • FGHIL
  • MNOPS
  • TUX

length

Perl 5 version 22.0 documentation

Please note: Many features of this site require JavaScript. You appear to have JavaScript disabled, or are running a non-JavaScript capable web browser.

To get the best experience, please enable JavaScript or download a modern web browser such as Internet Explorer 8, Firefox, Safari, or Google Chrome.

Recently read

length

  • length EXPR

  • length

    Returns the length in characters of the value of EXPR. If EXPR is omitted, returns the length of $_ . If EXPR is undefined, returns undef.

    This function cannot be used on an entire array or hash to find out how many elements these have. For that, use scalar @array and scalar keys %hash , respectively.

    Like all Perl character operations, length() normally deals in logical characters, not physical bytes. For how many bytes a string encoded as UTF-8 would take up, use length(Encode::encode_utf8(EXPR)) (you'll have to use Encode first). See Encode and perlunicode.

 
Morty Proxy This is a proxified and sanitized view of the page, visit original site.