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]
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"
--- 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
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";