• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

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?
0
cyrobinson
Asked:
cyrobinson
1 Solution
 
ozoCommented:
$string = "a2?76574=ghgh";
$binary = unpack'b*',$string;
$string = pack'b*',$binary;
0
 
cyrobinsonAuthor Commented:
I was so close yet so far away.  Thanx 4 your help
0
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.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now