Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: lcfirstChapter 5
Function Reference
Next: Reference: link
 

length

length val

Returns the length in bytes of the scalar value val. If val is omitted, the function returns the length of $_.

Do not try to use length to find the size of an array or hash. Use scalar @array for the size of an array, and scalar keys %hash for the size of a hash.


Previous: Reference: lcfirstPerl in a NutshellNext: Reference: link
Reference: lcfirstBook IndexReference: link

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.