in reply to Converting Binary Numbers into Binary File

binmode($fh_out); while (<$fh_in>) { chomp; print $fh_out pack('B*', $_); }

Reference: pack