Another direction which you may want to take is to have a look at
Using Temporary Files in Perl which discusses at length secure methods for the handling of temporary files, including the creation of anonymous IO streams for the storage of information in just the manner you request.
perl -le 'print+unpack("N",pack("B32","00000000000000000000001000101001"))'