Try single quoting the string that makes up the command you are passing to sh, I think everything after your /installP.pl is getting taken as arguments to sh rather than to installP.pl. so:
$cmd = "remsh $remhost -l root \"sh -c '/installP.pl $PATCHFILE $option $ARGV[2]' \" "; That should not prevent perl from interpolating the variables, but will turn the whole perl command line that you want into a single string for sh. http://danconia.org ------------------------------------------------ On Wed, 20 Nov 2002 19:45:19 +0530, "PRADEEP GOEL" <[EMAIL PROTECTED]> wrote: > Hi all > i am facing a quite crucial problem i.e. > > script one contains > " > $cmd = "remsh $remhost -l root \"sh -c /installP.pl $PATCHFILE $option > $ARGV[2] \" "; > print "system(\"$cmd\")"; > system("$cmd "); > " > > print "system(\"$cmd\")"; > correctly prints > > system("remsh nnmhpt1 -l root "sh -c /installP.pl /patch.conf c " ") > > & system("$cmd "); actually calls installP.pl & runs it as well , but i > don't undersatand > why is it not passing arguments (/patch.conf c ) as ARGV[0] & ARGV[1] > in the called script ( i.e. installP.pl ) ARGV[0] appears as blank - > nothing > > how to pass them - a really big & crucial problem , > is problem because of "sh" or remsh or ?? > > please suggest me possible causes and/or solutions > > thanks > pradeep > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]