I inherited an environment that has a “compiled” perl script on Unix. Is it possible to de-compile, reverse engineer (whatever the term is) it, and obtain the source code from the compiled object code ?
Might not be possible, but thought I’d ask rather than assume.
Thanks,
-Kevin.
Oh my!
If and only if it was compiled into executable byte code via
perlcc -B, you could then uncompile it the same way B::Deparse does. You’d get back all of the source that wasn’t optimized away that way. It might look a bit funny, but it would be an equivalent program.However, if it was fully compiled into C code and thence to assembler and machine language and run through
ldfor a propera.outfile, you aren’t going to be able to do anything like that. It’d be like trying to disassemble/bin/cat.So ok, you could disassemble it, but there’s no joy to be had there. Even if you could get out the original, generated C code — which you cannot — it would be virtually unusable.
I suppose you might running strings(1) on it to see whether anything useful got left lying around somewhere permanent, but I wouldn’t count on it.
Sorry.