[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Missing function perl.m
From: |
Julian Schnidder |
Subject: |
Re: Missing function perl.m |
Date: |
Tue, 1 Apr 2008 01:52:12 +0200 |
Am 31.03.2008 um 23:36 schrieb John W. Eaton:
On 31-Mar-2008, Julian Schnidder wrote:
| Here is a changeset that implements the perl function in octave.
|
| perl.m invokes the perl command via a call of system(). A perl
| interpreter with name "perl" is assumed to be present. No security
| checks are performed.
I think you can eliminate the loop by using
sprintf (" %s", varargin{:})
Good idea, thanks.
function [output, status] = perl (script = "", varargin = {})
...
The default aurgument for script is " -e ''" (the perl interpreter
executes an empty statement and exits). But I didn'd succeed in
setting a deault argument for varargin (syntax error at least in
version 3.0.0).
Probably there should be checks to ensure that varargin is a cell
array of character strings (see iscellstr) and to ensure that at least
one argument is provided.
The type (iscellstr) is performed, but still empty command line
argument strings are allowed. The argument script needs to be
nonempty and a string.
Here is a new changeset.
Kind regards,
JCS
changelog_perl.txt
Description: Text document