http://www.perlmonks.org?node_id=1004322


in reply to read string (which is in binary) and make decision

Welcome hey_frind,

Just a caution. The example strings represent binary information, but are actually ASCII characters for '0' and '1'. If the data your working with is in actual binary format, you may need to covert to ASCII characters to run the scripts. If that is the case then 'pack/unpack' will be your friend. Look at the 'b' and 'B' formats.

Good Luck!

"Well done is better than well said." - Benjamin Franklin