Skip to main content
Support

KB Article #44012

Perl script with argument

Problem

How to call a Perl script with some arguments in a decision rule?


Resolution


In a decision rule, if the "Perl script" execution type is selected, it''s not possible give some arguments to the call script. The typical error you can find in the log is : "file [/path/to/the/script.pl -arg] does not exist."



A solution to do this is to select the "Batch command" execution type and call the script by :
perl /path/to/the/script.pl -arg


The main problem of this solution is that if the Perl script is using associative tables %IN and %OUT, those will not be accessible anymore in the new execution's environment of the script. The parameters contained in these tables can be retrieved instead via the associative table %ENV.