Hello All,
I have a test file z.txt with following lines
*transformation
X Y Z
10 20 30
Finally i need to have a the same text files as follows,
*transformation
X Y Z
50 60 80
When i run the code in windows, I am getting the error
Global symbol requires explicit package.
Could you please let me know what is wrong .
	Looking forward to your response.
Ramesh
					I have a test file z.txt with following lines
*transformation
X Y Z
10 20 30
Finally i need to have a the same text files as follows,
*transformation
X Y Z
50 60 80
When i run the code in windows, I am getting the error
Global symbol requires explicit package.
Could you please let me know what is wrong .
Code:
	#!\usr\bin\perl 
use warnings;
use strict;
open IN, "z.txt";  
@file = <IN>;
$count = 0; 
foreach $file (@file){ 
if ($file =~ /\*transformation/){ 
$count = $count + 1; 
} 
if ( $count == 1 ){ 
$count = $count + 1; 
} 
if ( $count == 2 ){ 
$file =~ s/ 10 20 30/50 60 80/g; 
print IN $file; 
$count = 0;
last; 
} 
} 
close IN;
Ramesh
	
Comment