I am using Net::SMPP package to handle SMPP protocol.
One of the protocol parameters should be NULL terminated string.
When I send it I do :
my $receipted_message_id = '111111'."\0";
When I receive it I strip last character.
Is any better way to work with “C String” in Perl ?
You could trim the terminating null with a simple substitution:
…or simply chop() the last character: