Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
replacing & in tpl
cheeku
i want to replace in '&' in tpl, but it does not work.
I use the follwoing code
$strLinkURL = iwpt_dcr_value('repLink.txtLinkURL');
$strLinkURL = ~ s/\&/And/g;
It converts $strLinkURL into number 4294967295.
Find more posts tagged with
Comments
Adam Stoller
Hmm - that code seems to work just fine from the command line - however, it's possible that you're not getting an '&' but an '&' from iwpt_dcr_value() - though that wouldn't explain the number that you seem to be getting.
Have you tried compiling the generation with iwpt_compile using the '-ocode' switch to dump out a perl program - and then verify what the resultant code is? Perhaps the PT engine is converting your regex into something odd?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
bboyle
you don't have a space between the '=' and '~' do you?
it's a single operator: =~
Migrateduser
I'm liking that theory, because that would be a bitwise negation on the return value of the regex. That could very well return something that would be interpreted as a number.