On May 25, 4:44 ¨Âí¬ Òïâåòô Ëìåííå ¼óèïòôãõô®®®Àçïïçìåíáéì®ãïí¾ ÷òïôåº > 2009/5/25 Bertram Scharpf <li... / bertram-scharpf.de>: > > > > > Hi, > > > Am Montag, 25. Mai 2009, 17:30:43 +0900 schrieb Robert Klemme: > >> 2009/5/25 Mohit Sindhwani <mo_m... / onghu.com>: > >> > Jagadeesh wrote: > >> >> [sample perl code] > >> >> $CMD = join(' , cmd, $arg1, $arg2, $arg3); > > >> > Not 100% sure of what you need, but I think this will do the job forou: > >> > str = [cmd, arg1, arg2, arg3].join(' ') > > >> If this is for executing an external process, there is no need to lump > >> all these together, instead you can do which has the advantage that > >> you do not need a shell to parse the individual arguments and also > >> whitespace cannot cause trouble. > > >> system cmd, arg1, arg2, arg3 > > > There are two more advantages: Arguments that contain spaces > > remain one argument. > > That's what I meant (see above). > > > Arguments that contain shell operators like > > ; && || `...` could produce malicious side effects. > > Hehe, true! > > > Another approach: > > > ¨Âòçáòç±áòç²áòç³> > ¨Âùóôåãíä¬ ªáòç> > What advantage would it have to first create that array 'args'? Well this approach also look neat and readable. Thanks