develooper Front page | perl.perl5.porters | Postings from January 2005

Re: [perl #33689] no warning that variables names cannot containNUL bytes

Thread Previous | Thread Next
January 5, 2005 15:40
Re: [perl #33689] no warning that variables names cannot containNUL bytes
Message ID:
In article <>,
	Nicholas Clark (via RT) <> writes:
> # New Ticket Created by  Nicholas Clark 
> # Please include the string:  [perl #33689]
> # in the subject line of all future correspondence about this issue. 
> # <URL: >
> This is a bug report for perl from,
> generated with the help of perlbug 1.26 running under perl 5.008004.
> -----------------------------------------------------------------
> [Please enter your report here]
> Perl is consistently very proud that it can handle NUL bytes within data
> without flinching. However, variable names can't have NUL bytes in them.
> There's no underlying reason why they couldn't, because the hashes used to
> store variables names can store embedded NUL byes. However, it seems that
> variable names are always passed around internally as NUL terminated
> C strings (eg Perl_gv_fetchpv).

PS, two other places where perl can get confused by \0:

- The class you bless something into.
   e.g. perl -wle 'print ref(bless [], "abcd\0efgh")'
- $@. ERRSV is handled as string too often, 
   e.g perl -wle 'sub DESTROY { die "ab\0cd" } bless []'

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About