aboutsummaryrefslogtreecommitdiff
path: root/hex2block.pl
blob: 2dd90ed70abe53d3dc5a20e59c6b5d5636c8a972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl -w

$_ = <>;
chomp;
for(split /, */, $_) {
	s/, *//;
	s/0x//;
	my $out = sprintf("%08b", hex($_));
	$out =~ s/1/X/g;
	$out =~ s/0/ /g;
	print "$out\n";
}