Don't ask to ask, just ask | |
PerlMonks |
Re: Debug and workaround helpby Animator (Hermit) |
on Jun 28, 2005 at 10:14 UTC ( [id://470557]=note: print w/replies, xml ) | Need Help?? |
Can you please explain what output you want? My guess is that you want to replace <Buisnessnames ...> with <Bnames ...> in which case $' is incorrect. You could consider using $&, but that IMHO is yet another idea.. Why don't you do one big replace? Why care about extracting the thing via a match and then using it in a subtitution? What would be wrong with: s/<BusinessNames (.*?)>/$strRepl/mi; ? Also note that you don't need the quotes in print "$string"; I would even suggest dropping them since it makes it a little bit less readable (or atleast to me)
In Section
Seekers of Perl Wisdom
|
|