#!/usr/bin/perl use strict; use warnings; =for info takes string binary input, one byte per line, and outputs text, e.g.: 01100010 01100001 01110011 01100101 00100000 00110010 becomes "base 2". =cut while (<>) { chomp; print chr(bin2dec($_)); } print "\n"; sub bin2dec { return unpack('N', pack('B32', substr('0' x 32 . shift, -32))); }