in reply to Re^2: How is perl able to handle the null byte?
in thread How is perl able to handle the null byte?
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.
@/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: How is perl able to handle the null byte?
by BrowserUk (Patriarch) on Jun 16, 2006 at 19:57 UTC |