Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Create a Binary file using perl

by editi (Novice)
on May 22, 2007 at 10:41 UTC ( #616724=perlquestion: print w/ replies, xml ) Need Help??
editi has asked for the wisdom of the Perl Monks concerning the following question:

Monks,
Please help me to create a binary file from txt file(i have sample.txt) it has to convert into binary file.
and also help me how to convert binary file to ascii file
and thanks in advance

Comment on Create a Binary file using perl
Replies are listed 'Best First'.
Re: Create a Binary file using perl
by blazar (Canon) on May 22, 2007 at 12:12 UTC
    Please help me to create a binary file from txt file(i have sample.txt) it has to convert into binary file.

    "Binary file" is a way to refer to anything that is not a plain text file, and in some sense they're the same thing under some platforms. Thus you must have in mind some specific kind of binary file, but you're failing to tell you us what it is or maybe you even don't really know. Thus one way to answer your question would be: just add some random non ascii chars to your text file. (I'm reasoning all out of the unicode realm which makes things even slightly more complex, and I don't know much.)

Re: Create a Binary file using perl
by Joost (Canon) on May 22, 2007 at 12:06 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://616724]
Approved by Joost
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (13)
As of 2015-09-02 19:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred temperature scale is:










    Results (87 votes), past polls