in reply to Re^3: How is perl able to handle the null byte?
in thread How is perl able to handle the null byte?
I question strongly that this is a serious performance issue ...
Think again.
The taint flag is set at a few, very specific points of input. And it remains set until it is modified
Think of all the different ways a string can be read in, constructed or modified. Interpolation of other strings, concatenation, join, pack, unpack, qq//, s///, tr///, substr, chomp, chop, sprintf, read, sysread, vec, promotion of IVs & NVs to PVs etc. etc. Every time a scalar is modified it would be necessary to recheck whether it now (or still) contains one or more null characters--and if it does, whether they are a legitimate part of a multibyte character or not.
Still doubt the performance impact?
|
---|