You might need to provide the path to perl.exe like this:

/usr/bin/perl /<path>/script.pl <args>

To find the path to perl, open a bash shell and run:

which perl

There are other ways to do it but one way is add something like this to the end 
of your SetScript and pass the arguments to your script as a delimited list 
like this (using pipe-delimiters here):

/usr/bin/perl /<path>/script.pl "${CAUSE}|${MHANDLE}|${MNAME}"

Then in your Perl script get the arguments like this:

my @args = split(/\|/, @ARGV[0]);
my $pCause = $args[0];
my $modelHandle = $args[1];
my $modelName = $args[2];


Craig Porter, Enterprise Systems Management - Availability & Performance 
Monitoring
Marsh & McLennan Companies
Global Technology Infrastructure (MGTI) | Centralized Operations
Sackville House 1.6, 143-149 Fenchurch Street, London EC3M 6BN, Great Britain
+44 (0)20 7178 4827 | Mobile +44 (0)7585 803 093 | craig.por...@mmc.com
www.mmc.com


-----Original Message-----
From: kavi arasu [mailto:kaviaras...@gmail.com]
Sent: 22 January 2015 13:12
To: spectrum
Subject: [spectrum] Run perl script from setscript

Hi All,

I need to run the perl script via setscript. Normally i used to run the perl as 
"perl [path]script.pl modelname" where modelname is the input of the perl.

This modelname input is retreived under "$MNAME" variable in setscript.

So, i need to run the command like "perl [path]script.pl $MNAME" Please let me 
know how to invoke this under setscript.

Thanks,
Kavi
---
To unsubscribe from spectrum, send email to lists...@unc.edu with the body: 
unsubscribe spectrum craig.por...@marsh.com


Marsh Ltd. Registered in England and Wales Number: 1507274
Registered office 1 Tower Place West, Tower Place, London, EC3R 5BU.

Marsh Ltd is authorised and regulated by the Financial Conduct Authority.

This message and any attachments are confidential.
If you have received this message in error please delete it from your system.
If you require any assistance please notify the sender. Thank you.

---
To unsubscribe from spectrum, send email to lists...@unc.edu with the body: 
unsubscribe spectrum arch...@mail-archive.com

Reply via email to