Re: Getting a variable back

2002-12-16 Thread John W. Krahn
Bob H wrote: > > 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]

Re: Getting a variable back

2002-12-16 Thread Dave K
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"

Re: Getting a variable back

2002-12-16 Thread Ovid
--- Bob H <[EMAIL PROTECTED]> wrote: Bob, What are you trying to accomplish? Perhaps we can help you find a more secure way of doing this. > if(scalar(@match)) { > $file=$match[$#match]; > print "Downloaded file $file\n"; > $ftp->binary(); > $ftp->get($file); > } > > I now wa

Getting a variable back

2002-12-16 Thread Bob H
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";