in reply to how to store binary string?

You can use UUencoding, perl supports it natively (= without any modules). It can wrap nicely in your source code, too: the line lengths in UUencoded strings are limited.
print unpack 'u*', '92G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R+```';

You can use perl to produce the UUE string, from a binary file, for example.

print pack 'u*', $binstring;

Likewise, you can use a hex string. It doesn't wrap nicely, not without extra measures anyway, and it's longer than UUE: 2x versus 4/3x increase in size.

print pack 'H*', '4A75737420416E6F74686572205065726C204861636B65722C';
Generating such a string can again be done in Perl.
print unpack 'H*', $binstring;
Note that, compared to UUE, the meaning of packand unpack are swapped: in hex, raw/binary is packed, hex text is unpacked. OTOH, UUE is packed, the raw original is unpacked.