in reply to How does Perl handle strings with embedded NULLs?

There are places where embedded \000 characters will get you into trouble, but Perl can read and write such files without problems, since Perl uses counted strings.

Be warned though that passing such strings to anything like a system routine (like open() or -x), that take null-terminated strings as arguments, you will have problems or security holes.

  • Comment on Re: How does Perl handle strings with embedded NULLs?

Replies are listed 'Best First'.
RE: Answer: How does Perl handle strings with embedded NULLs?
by strredwolf (Chaplain) on Aug 13, 2000 at 11:39 UTC
    That answers it nicely. As is, I'm planning to slurp it all in and then do a
    @msgid=split /\000/, $data; foreach $j (@msgid) { $mid($j}++; }

    (reason? I wanna filter my POP account by already-dl'ed message-id's)

    --
    Perl is intergalactic! WolfSkunks use it!