1Devel::Hexdump(3) User Contributed Perl Documentation Devel::Hexdump(3)
2
3
4
6 Devel::Hexdump - Print nice hex dump of binary data
7
9 use Devel::Hexdump 'xd';
10
11 my $binary = '...';
12 print xd $binary, {
13 row => 10, # print 10 bytes in a row
14 cols => 2, # split in 2 column groups, separated with <hsp?>
15 hsp => 2, # add 2 spaces between hex columns
16 csp => 1, # add 1 space between char columns
17 hpad => 1, # pad each hex byte with 1 space (ex: " 00" )
18 cpad => 1, # pad each char byte with 1 space
19 };
20
21 # or just
22 print xd $binary;
23
25 Mons Anderson, <mons@cpan.org>
26
28 Copyright (C) 2011 by Mons Anderson
29
30 This library is free software; you can redistribute it and/or modify it
31 under the same terms as Perl itself, either Perl version 5.14.2 or, at
32 your option, any later version of Perl 5 you may have available.
33
34
35
36perl v5.32.0 2020-07-28 Devel::Hexdump(3)