|laziness, impatience, and hubris|
How is perl able to handle the null byte?by muba (Priest)
|on Jun 15, 2006 at 18:38 UTC||Need Help??|
muba has asked for the
wisdom of the Perl Monks concerning the following question:
I was wondering this, and hoping you could tell me.
First off: I know almost nothing about C, but I do know that C treads a null byte as the end of a string (or whatever those things are called in C).
But then how is perl able to have them included in strings?
Being written in C, a null byte in a perl string (let's say "abc\x00def") would logically just be "abc", with the "def" part being cut off by C.
Yet, that isn't the case.
How is that possible?