V
Vahid
Hi,
With the following code, I can search and replace a pattern in a file,
but I am not too sure if that is a correct way or if there is a better
solution.
I will *only* look for the "." dot which is *always* at the last
line in a file and replace it with a string and add the dot at the end
of the file again.
while (<INPUT_Handle>)
{
$INP_LINE=$_;
$INP_LINE=~ s/$ORIG_string/$NEW_string/g;
print OUTPUT_Handle "$INP_LINE";
};
close(INPUT_Handle);
close(OUTPUT_Handle);
};
Thanks for the help.
Vahid.
With the following code, I can search and replace a pattern in a file,
but I am not too sure if that is a correct way or if there is a better
solution.
I will *only* look for the "." dot which is *always* at the last
line in a file and replace it with a string and add the dot at the end
of the file again.
while (<INPUT_Handle>)
{
$INP_LINE=$_;
$INP_LINE=~ s/$ORIG_string/$NEW_string/g;
print OUTPUT_Handle "$INP_LINE";
};
close(INPUT_Handle);
close(OUTPUT_Handle);
};
Thanks for the help.
Vahid.