go ahead... be a heretic | |
PerlMonks |
Re: Reconstruct binary data saved with unpack("H*", $b)by ikegami (Patriarch) |
on Jul 27, 2011 at 19:27 UTC ( [id://917111]=note: print w/replies, xml ) | Need Help?? |
Unless your ok with just using chop on the result — at which point it will only work if the input length is odd — it is impossible to recreate your original data since multiple inputs encode identically.
If you don't care about preserving leading zeroes, you can use
If you don't care about preserving leading zeroes, you can use
If you do care about preserving leading zeroes, you can use
In Section
Seekers of Perl Wisdom
|
|