#!/usr/bin/perl -w $count = 0; while(<>) { $_ = substr($_, 0, 79); s/.*; \w\w\w\w // or next; my @bytes = split " "; push @got, eval "0x$_" for @bytes; } for(@got) { my $b = sprintf("%08b", $_); $b =~ s/0/_/g; $b =~ s/1/X/g; printf "%02x ", $_; print $b . "\n"; $count++; if($count == 10) { print "\n"; $count = 0; } }