A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://perldoc.perl.org/functions/length below:

length - Perldoc Browser

#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('UTF-8', EXPR)) (you'll have to use Encode first). See Encode and perlunicode.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4