You can have list of examples by just
man perlcc 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 So what is the different? Check with file command,
file hello* Output:
hello: perl script text executable
hello-bin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), not stripped
File shows that “hello” is perl script, where “hello-bin” is a ELF executable binary file.


0 comments:
Post a Comment