All,
Environment: TS5.5.2, OS-w2k
writting a script to replace "<a href=" value all html files over a workarea. Opening the html and doing a find and replace. Just wondering if there is any other best way to do it. If this method is ok, need regex help.
-------------code below -----------------
if ($path =~ m/\.html$/){
my $fileName = $path;
open LocationsFH, $path or die $!;
my
@fileContent = ();
while (<LocationsFH>)
{
chomp;
push(
@fileContent, $_);
}
foreach (sort
@fileContent) {
${_} =~ s|(\<a href \=\")(\/****\/index\.html)|(\<a href \=\")(\/****\/Temp\/index\.html)|g;
}
close (LocationsFH);
open(FILE, "<$path");
my $fileContent = <FILE>;
close(FILE);
}
-------------end code -------------
thanks