Data-Hexify

This module exports one subroutine: Hexify.

Hexify formats arbitrary (possible binary) data into a format suitable for hex dumps in the style of xd or hexl.

The first, or only, argument to Hexify contains the data, or a reference to the data, to be hexified. Hexify will return a string that prints as follows:

0000: 70 61 63 6b 61 67 65 20 44 61 74 61 3a 3a 48 65 package Data::He 0010: 78 69 66 79 3b 0a 0a 75 73 65 20 35 2e 30 30 36 xify;..use 5.006

and so on. At the left is the (hexadecimal) index of the data, then a number of hex bytes, followed by the chunk of data with unprintables replaced by periods.

An optional second argument can be used to tailor the Hexify output to your specific needs.

WHY

Why Data::Hexify when there is Data::HexDump and Data::Hexdumper?

Data::Hexify has a number of options not found in other hex dumpers:

See the documentation for details.

INSTALLATION

To install this module type the following:

perl Makefile.PL
make
make test
make install

DEPENDENCIES

This module requires these other modules and libraries:

Test::More (for "make test" only)

COPYRIGHT AND LICENCE

Copyright (C) 2004 Squirrel Consultancy

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any other version of Perl 5 you may have available.