Solved

pack command

Posted on 2002-06-07
2
194 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
ID: 7063179
$string = "a2?76574=ghgh";
$binary = unpack'b*',$string;
$string = pack'b*',$binary;
0
 

Author Comment

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

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Reading fields from the text file. 4 96
rename outfile before writing 2 72
Migrate OTRS to newest version. 1 326
Perl Write to Specific line in a file 15 90
On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
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 shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

776 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