On Thu, 4 Dec 2014 16:06:26 +0530 Jitendra Barik <jbarik...@gmail.com> 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: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/