in reply to help me ---regarding string

Are you sure your text isn't encoded using UTF-16 or similar?

use Encode qw( decode ); my $text = decode('UCS-2le', "a\0b\0c\0 \0d\0e\0f\0"); print("$text\n"); # abc def