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];
>     print "Downloaded file $file\n";
>     $ftp->binary();
>     $ftp->get($file);
> }

Ah, another person getting the latest AV file from ftp.symantec.com.


> 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.

my @switches = qw( -t -h -f );

system( $file, @switches ) == 0 or die "system $file failed: $?"



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to