Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Re: Embedding an Executable file in Perl program

by meetraz (Hermit)
on Mar 31, 2003 at 22:51 UTC ( [id://247090]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Embedding an Executable file in Perl program
in thread Embedding an Executable file in Perl program

Your original request asked how to "embed an executable file". The easiest way to do this is to convert your binary executable into a text-based string. One such way is to escape each byte using \xNN syntax. If your binary executable is 30k, you will have a string made up of 30,000 variations of "\xNN". The getexe() function is just returning this binary data to the main part of the program so it can be extracted to disk. You don't have to do it this way - I just thought it made it easier to read. I put the ##(more data here) in there because the post would have been really huge if I posted all 30k. Your executable code will be different anyway.
  • Comment on Re: Re: Re: Embedding an Executable file in Perl program

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://247090]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-24 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found