On 3/20/07, Stan Cooper <[EMAIL PROTECTED]> wrote:
Hi;
I need to add a line that calls a shell script to a perl script I found. Is it 
as simple as just adding the path of the script?

else
    /usr/local/bin/my_script.sh

Or is there some special incantation?
TIA,
Stan2

There are several methods.  Which one you chose depends on what you
need.  The two most common are backticks and the system function.  If
you need to capture the output then you need to use backticks:

my $output = `/usr/local/bin/my_script.sh`;

If you do not care about the output of the script then you can use the
system function:

system "/usr/local/bin/my_script.sh";

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to