             type: "string"
             title: "Perl executable path"
             default: "perl"
+        executableCwd:
+            type: "string"
+            title: "Current working directory for execution"
+            default: ""
         incPathsFromProjectRoot:
             type: "array"
             title: "Include paths from project root"

            (executablePath) =>
                @executablePath = executablePath

        @subscriptions.add atom.config.observe "#{pkg.name}.incPathsFromProjectRoot",
            (includePaths) =>
                @includePaths = includePaths


        sourceCode = textEditor.getText()

        executableCwd = settings.executableCwd
        if executableCwd == ''
            executableCwd = fileDir

        return helpers.exec(
            settings.executablePath,
            parameters,
            {
                stdin: sourceCode,
                stream: 'both',
                cwd: executableCwd}
            ).then (result) ->
                messages = []
                regex = namedRegExp.named(REGEX)
