develooper Front page | perl.beginners | Postings from December 2002

Getting a variable back

Thread Next
From:
Bob H
Date:
December 16, 2002 13:47
Subject:
Getting a variable back
Message ID:
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
 
 

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About