in reply to Re: Re: Hex format conversion in Perl
in thread Hex format conversion in Perl
Why would you want an extra conversion step? Maybe you like to dump the hex-string on a terminal, readible to the human eye? Insert it in an e-mail (base64 would be better in that case)? Does the database only accept ASCII strings (BerkeleyDB eg does accept them)?
But if you just want to redirect the data in a perlish way, just keep with the unconverted 1-byte wide strings.
Jeroen
"We are not alone"(FZ)
Update: epoptai CB'd me an alternative
explanation of the posting, that makes more sense.
His code will do. But, consider
pack 'u*', $gif;, CGIPack or
MIME::Base64 to pack
your strings, as that shortens the strings somewhat.
|
|---|