
rovf
Veteran
Jan 26, 2011, 6:52 AM
Post #3 of 9
(1295 views)
|
|
Re: [cesarNZ] calling shell script function from perl script
[In reply to]
|
Can't Post
|
|
From the syntax you are using, I guess the shell script is supposed to be either Bourne Shell, or bash, or zsh. Right? You need to create a wrapper shell program which sources the script where you define the shell function, and invokes this shell functions via the parameters passed from Perl to the wrapper script. For invoking the wrapper script, you have several posibilities. The most common ones ares: system(...) [if you are not interested in the stdout/stderr of your execution], and qx(...) [if you want to process the script's stdout in your Perl program].
|