You are absolutely right: NSTask is on a Cocoa (not Cocoa -Touch) class suitable for you. You can start any subprocess, given that this subprocess inherits the environment from your main task (but, of course, you can apply various settings, for example, the start directory). The advantage with respect to "system ()" is that the NSTask "start" method is not blocked, so you can use it for long asynchronous tasks (and receive completion notifications).
For a specific perl case, run the perl script as on the command line: "/ usr / bin / perl ..."
Finally, you can try with PerlObjCBridge (link: PerlObjCBridge.pm man page ) for a kind of interprocess communication between Objective-C and perl objects.
source share