- my @in = @_;
- my $t = time;
- for (@in) {
- s/\n$//o;
- s/\a//og; # beeps
- print "$_\n" if defined \*STDOUT;
- $fp->writeunix($t, "$t^$_");
+ foreach my $l (@_) {
+ for (my $o = 0; $o < length $l; $o += 16) {
+ my $c = substr $l, $o, 16;
+ my $h = unpack "H*", $c;
+ $c =~ s/[\x00-\x1f\x7f-\xff]/./g;
+ my $left = 16 - length $c;
+ $h .= ' ' x (2 * $left) if $left > 0;
+ dbg($m . sprintf("%4d:", $o) . "$h $c");
+ $m = ' ' x (length $m);
+ }