I have a file say test.txt which has the following lines
@TS_FILE:|: win32version\files\TEST_5643_PCB53105
@TS_FILE:|: win32version\files\TEST_5645_PCA53105
I need to replace the above lines as below in the same file
@TS_FILE:|: win32version\files\PCB53105
@TS_FILE:|: win32version\files\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..
Expand|Select|Wrap|Line Numbers
- open (FH1, "TestPlan.tst") || die "Can't find the tst file";
- my $var='@TS_FILE:|: win32version\Attached_files\TEST_';
- print $var;
- while (<FH1>) {
- $temp = $_;
- if ($temp =~ /"$var"/) {
- print $_;
- print "Match Found";
- }
- }
- close(FH1);