GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  STRING::HEXCONVERT (3)

.ds Aq ’

NAME

String::HexConvert - Converts ascii strings to hex and reverse

CONTENTS

SYNOPSIS



 use String::HexConvert :all;

 print ascii_to_hex("hello world"); # writes: 68656c6c6f20776f726c64

 print hex_to_ascii("68656c6c6f20776f726c64"); # writes: hello world



DESCRIPTION

It is a wrapper around pack and unpack of perl to convert a string of hex digits to ascii and other way around.

REQUIRES

Exporter

METHODS

    ascii_to_hex



 my $hex = ascii_to_hex($ascii);



Converts a string to pairs of hex digits

    hex_to_ascii



 my $ascii = hex_to_ascii($hex);



Converts pairs of hex digits to asci

WHY?

In know the comments like is that realy needed?. IMHO yes, because I forget the exact syntax and possibilities of pack and unpack but hex_to_ascii tells me directly what pack H* does.

SEE ALSO

pack, unpack, Data::Translate

AUTHOR

Andreas Hernitscheck ahernit(AT)cpan.org

LICENSE

You can redistribute it and/or modify it under the conditions of LGPL.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 STRING::HEXCONVERT (3) 2010-12-08

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.