Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^3: How is perl able to handle the null byte?by fizbin (Chaplain) |
on Jun 16, 2006 at 18:58 UTC ( [id://555853]=note: print w/replies, xml ) | Need Help?? |
Well, especially for builtins perl should know if the char* it's handing off to the system call will be interpreted as a classic C string or as a wide character. I question strongly that this is a serious performance issue - among other things, null-containing strings could easily be flagged as such, the way tainted strings are when running under taint mode. As for what perl should do, I certainly think that a warning when running under -w is appropriate - this is at least as big a problem as interpolating an undef variable into a string. I might even be convinced that perl in taint mode should treat nul-containing strings as tainted when passing them to C APIs - that is, die.
--
In Section
Seekers of Perl Wisdom
|
|