Juerd Waalboer schreef: > Dr.Ruud: >> perl -wle ' >> $s = substr "\x{100}\xFF", 1; >> print length $s, ":", unpack "H*", $s; >> ' > > Note that normally, unpack "H*" on a unicode string (like your $s) is > a violation of proper separation. > > Of course, it's warranted when you really want to demonstrate the > internals like you have now. I'm just commenting for clarity. Yes, thanks for that note, I should have included such a "warning" myself. > My preferred way to show the internals is Devel::Peek::Dump: > > use Devel::Peek; > > $s = substr "\x{100}\xFF", 1; > Dump $s; > > Output: > > SV = PV(0x8149ae8) at 0x8149624 > REFCNT = 1 > FLAGS = (POK,pPOK,UTF8) > PV = 0x816a920 "\303\277"\0 [UTF8 "\x{ff}"] > CUR = 2 > LEN = 4 Nice tool for my box too. -- Affijn, Ruud "Gewoon is een tijger."