Bob, Consider: cls.pl use strict; my @switches = @ARGV; foreach(@switches) { print"$_\n"; }
$ perl -e ' my @clss = ("cls.pl", "one", "two", "three"); system @clss;' output: one two three Takes the first element treats it as an executable and the rest of the list as arguments. HTH "Bob H" <[EMAIL PROTECTED]> wrote in message 002d01c2a54c$c7c94870$a4203118@home5j8ddwdscw">news:002d01c2a54c$c7c94870$a4203118@home5j8ddwdscw... > I have a program that gets an EXE file using a regex pattern and puts it > into a file variable: > > foreach(@list) { > if(m/\d{8}.*x86.exe/) { > push(@match,$_) > } > } > > I then download the matching file: > > if(scalar(@match)) { > $file=$match[$#match]; > print "Downloaded file $file\n"; > $ftp->binary(); > $ftp->get($file); > } > > I now want to run the downloaded EXE with some command line switches. I > have tried it with system but it doesn't seem to like using the variable > $file plus switches so I was wondering about how to get the filename out > of the $file variable. If that makes sense. > > Bob > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]