Hi all,
I have a file say test.txt which has the following lines
@TS_FILE:|: win32version\fi les\TEST_5643_P CB53105
@TS_FILE:|: win32version\fi les\TEST_5645_P CA53105
I need to replace the above lines as below in the same file
@TS_FILE:|: win32version\fi les\PCB53105
@TS_FILE:|: win32version\fi les\PCA53105
I need to remove "TEST_XXXX_ " form it..
I tried the same but Iam not able to even match the required line Can anyone tell me how
to do the same..iam new to perl..
[CODE=perl]
open (FH1, "TestPlan.t st") || die "Can't find the tst file";
my $var='@TS_FILE: |: win32version\At tached_files\TE ST_';
print $var;
while (<FH1>) {
$temp = $_;
if ($temp =~ /"$var"/) {
print $_;
print "Match Found";
}
}
close(FH1);
[/CODE]
I have a file say test.txt which has the following lines
@TS_FILE:|: win32version\fi les\TEST_5643_P CB53105
@TS_FILE:|: win32version\fi les\TEST_5645_P CA53105
I need to replace the above lines as below in the same file
@TS_FILE:|: win32version\fi les\PCB53105
@TS_FILE:|: win32version\fi les\PCA53105
I need to remove "TEST_XXXX_ " form it..
I tried the same but Iam not able to even match the required line Can anyone tell me how
to do the same..iam new to perl..
[CODE=perl]
open (FH1, "TestPlan.t st") || die "Can't find the tst file";
my $var='@TS_FILE: |: win32version\At tached_files\TE ST_';
print $var;
while (<FH1>) {
$temp = $_;
if ($temp =~ /"$var"/) {
print $_;
print "Match Found";
}
}
close(FH1);
[/CODE]
Comment