Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^5: length() returns wrong result - suspicious magic

by ikegami (Pope)
on Sep 15, 2010 at 16:19 UTC ( #860243=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    set_magic($txt);
    print(length($txt), "\n"); Dump($txt);
    
  2. or download this
    4
    SV = PVMG(0x81af530) at 0x817bca0
    ...
        MG_VIRTUAL = &PL_vtbl_utf8
        MG_TYPE = PERL_MAGIC_utf8(w)
        MG_LEN = 6
    
  3. or download this
    SV = PV(0x816a0c0) at 0x817bca0
      REFCNT = 1
    ...
      PV = 0x8177b98 "K\303\244se"\0 [UTF8 "K\x{e4}se"]
      CUR = 5
      LEN = 8
    
  4. or download this
    SV = PVMG(0x81af570) at 0x817bca0
      REFCNT = 1
    ...
        MG_VIRTUAL = &PL_vtbl_utf8
        MG_TYPE = PERL_MAGIC_utf8(w)
        MG_LEN = -1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://860243]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2015-07-29 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls