I have a script that is *supposed* to search a file and make certain
words that I have in an array uppercase. My brain is not grokking it.
Q1: What is wrong with my script (below)?
Q2: Can I update a file in place?
Q3: How do I run multiple things against one file in one script?
=== SCRIPT ===
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";
If I have a variable that I used to a regex to populate how can I now
expand that variable?
Ex:
I have a variable $file that I use a regex to match a file in a
directory and put that match into $file. Now I want to get that info out
of the $file variable and use it in a system() call.
Bob
-- WGO
> [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 20, 2002 8:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Expanding a variable
>
>
> print $file . "\n";
> Puts to STDOUT (Screen) what is in $file.
>
> Wags ;)
>
> -Original