From: Brian Candler Date: 2008-10-04T04:55:56+09:00 Subject: Re: Remotely passing value on system() or %x[] Bikas De simex wrote: > system("plink -pw ppp xxx@yyyy /tmp/essai.ksh #{dirc[3]}") work ....! Even better is: system("/path/to/plink", "-pw", "ppp", "xxx@yyyy", "/tmp/essai.ksh", dirc[3]) This is because the argument array is passed as-is to the child process. There is no shell performing line splitting. This eliminates a number of potential errors and security holes, e.g. if dirc[3] contains spaces, quotes, or other special characters subject to interpretation by the shell. -- Posted via http://www.ruby-forum.com/.