#!/usr/bin/perl -ws # # hex2bin.pl # # This script converts hex number(s) to binary. and prints out each digit xxxx. # You can ask to reverse bits and digits in the output # You can change the separate character by reassigning the $char variable! # e.g.: # % ./hex2bin.pl -no_revb -no_revd -no_verbose 06d1a440c 0ffc # 0000 0110 1101 0001 1010 0100 0100 0000 1100 # 0000 1111 1111 1100 # Run hex2bin.pl -h to see the options # # Last modified: Wed Aug 21 14:35:03 SGT 2002 # Author: Stas Bekman # use strict; use vars qw($h $no_revb $no_revd $no_verbose); $0 =~ s|^.*/||; # cut the basename of the command # Diagnostic part... if (!@ARGV || $h) { die <