You will want to have a look at the
Expect module which will handle interactive tasks without operator assistance. The documentation for this module includes an extensive list of frequently asked questions about how to make things work.
perl -e 'print+unpack("N",pack("B32","00000000000000000000000111100110")),"\n"'