in reply to Unexpected output from my PERL program. WHAT is my problem???

There are two possibilities: your C program could have problems with the 0-bytes, or your perl program doesn't work in the environment you're putting it in.

You can check your perl program by printing the output both to STDOUT and to a file while running inside the C program. If that writes the expected output to the file, it's not the different environment of the perl program, but rather the C program that's to blame.

You can change the character encoding of the output with

binmode STDOUT, ":encoding(UTF-8)";

Maybe an output with less 0 bytes is less confusing for your C program :-)

Perl 6 - links to (nearly) everything that is Perl 6.