On Thu, 4 Dec 2014 16:06:26 +0530
Jitendra Barik <[email protected]> wrote:
> My code is:
>
> $version1 = "JITENDRA";
> tie @array,Tie::File,"$rtf1" or die($!);
>
> for(@array){
> #print "Hi";
> s/\%VERSIONS\%/$version1/g;
>
>
> }
> untie(@array);
>
> FILE:
> ***********************************************************************
>
> *Version *%VERSION%, Hello,HI
In the substitution, you have VERSIONS but in the file, you have VERSION
If the S is optional, use: s/\%VERSIONS?\%/$version1/g;
--
Don't stop where the ink does.
Shawn
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/