Here's my problem.  I'm using InstallShield to install a custom app at
several different sites.  Each app at each location has their own cfg
file with distinct IP addresses.  During the InstallShield, I'd like to
preserve that IP info and insert that info into the new cfg file that
InstallShield installs.

I've already written a dos batch file that does this but my manager
wants it done in Perl.

As far as Perl goes, I know how to search for a string(IP address).  I
know how to do a search and replace.  What I don't know how to do is
search for string, assign that string to a variable and then use that
variable in a search and replace statement.

Here's what I'm using to search for the string...

open FILE, "<config.cfg" or die "can't open config.cfg: $!";
my @lines = <FILE>;
print grep /OAM/i, @lines;

This returns the string OAM...  Can I assign this to a variable?


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

Reply via email to