pack command

How do I convert a string (alphanumeric) to binary and then back again?

e.g. $string = "a2?76574=ghgh"

I take it you use pack to convert into binary and then unpack to convert the other way, I have tried this and cant get the syntax right.  Any ideas?
Who is Participating?
ozoConnect With a Mentor Commented:
$string = "a2?76574=ghgh";
$binary = unpack'b*',$string;
$string = pack'b*',$binary;
cyrobinsonAuthor Commented:
I was so close yet so far away.  Thanx 4 your help
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.