MATLAB: Do I receive an error message when I try to invoke a Perl script from MATLAB

MATLAB

I am trying to invoke my Perl script, myperlscript.perl, in MATLAB. My Perl script takes no input arguments but returns output. When I execute the following command:
perl('myperlscript.pl');
I receive the following error:
??? Error using ==> perl
however the correct program output follows the error message.

Best Answer

If your Perl function returns output, you must use the correct syntax to the PERL command that captures the output variable:
result = perl('myperlscript.pl')
For more information on the PERL command, type
doc perl