in reply to Re^4: hexdump -C
in thread hexdump -C
So, once again, here is the working code:
#!/usr/bin/perl -w use strict; use warnings; @ARGV = ($0); print hexdump( join('', <>) ); sub hexdump { my $s; $_[0] =~ s/\G(.{1,16})/ $s = $1; $s =~ y|\x20-\x7e|.|c; sprintf("%08 +X %-50s|%s|\n", $-[0], "@{[unpack q{(H2)8a0(H2)8}, $1]}", $s);/ges; return $_[0]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: hexdump -C
by ikegami (Patriarch) on Oct 15, 2025 at 14:28 UTC | |
|
Re^6: hexdump -C
by NERDVANA (Priest) on Oct 16, 2025 at 02:58 UTC |