Ich gehe mal von C/C++ aus, inwiefern Perl ähnliche Sprachelemente bereitstellt, weiß ich jedoch nicht.

Gehen wir von einem simplen Shellcode aus:
Code:
unsigned char *Shell = "\xc3"; // retn
Inline-Assembly:
Code:
__asm call Shell // oder ähnlich, jmp, push/retn, ...
Funktionspointer (etwas sauberer, im Bezug auf x86/x64):
Code:
typedef void (__stdcall *fShell)();
fShell MyShell = (fShell)Shell;
MyShell();