Help for this page

Select Code to Download


  1. or download this
    sub bytelen(_) {
        require bytes;
        return bytes::length($_[0]);
    }
    
  2. or download this
    sub utf8len(_) {
        utf8::upgrade($_[0]);
        require bytes;
        return bytes::length($_[0]);
    }
    
  3. or download this
    sub utf8len(_) {
        utf8::upgrade($_[0]);
    ...
        Encode::_utf8_on($_[0]);
        return $utf8len;
    }