Solved

pack command

Posted on 2002-06-07
2
176 Views
Last Modified: 2010-03-05
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
Comment
Question by:cyrobinson
2 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 200 total points
Comment Utility
$string = "a2?76574=ghgh";
$binary = unpack'b*',$string;
$string = pack'b*',$binary;
0
 

Author Comment

by:cyrobinson
Comment Utility
I was so close yet so far away.  Thanx 4 your help
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now