Help for this page

Select Code to Download


  1. or download this
    $chars = length($scalar);  # length in characters
    # what you probably were looking for
    
  2. or download this
    $bytes = do {use bytes; length($scalar)} # length in bytes
    # bytes may be != chars for unicode strings