Create perl binaries from perl scripts

we can convert perl script to binary using

perlcc command in a simple way

First let us generate a perl script, create a file call hello

#!/usr/bin/perl
print "hello world. ";

Convert it into executable,

chmod +x hello

Try to run it, that is our normal perl script. To make it as a binary with ELF header, do this

perlcc -o hello-bin hello
now run ./hello-bin
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s