Devel::Hexdump - Print nice hex dump of binary data
use Devel::Hexdump 'xd'; my $binary = '...'; print xd $binary, { row => 10, # print 10 bytes in a row cols => 2, # split in 2 column groups, separated with <hsp?> hsp => 2, # add 2 spaces between hex columns csp => 1, # add 1 space between char columns hpad => 1, # pad each hex byte with 1 space (ex: " 00" ) cpad => 1, # pad each char byte with 1 space }; # or just print xd $binary;
Mons Anderson, <mons@cpan.org>
Copyright (C) 2011 by Mons Anderson
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.
To install Devel::Hexdump, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::Hexdump
CPAN shell
perl -MCPAN -e shell install Devel::Hexdump
For more information on module installation, please visit the detailed CPAN module installation guide.