some perl problem

Is Coranto not working properly for you? Here's where to ask for support help; for best results, follow these steps:
  • - Check your core/addon documentation for possible solutions
  • - Search these forums for similar problems that have already been solved
  • - If you're still stumped, check out THIS TOPIC, and post your question in this forum!!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

some perl problem

Postby web » Sun Nov 11, 2007 4:39 pm

sorry if it's an off topic but i know you can help
i'm using that in one of my styles
Code: Select all
<PerlCode>
$string1 = $Text;
$string1 =~ s/<br>/ /g;
$string1 =~ s/"/&quot;/g;
$string1 =~ s/</&lt;/g;
$string1 =~ s/>/&gt;/g;
$string1 =~ s/'/&apos;/g;
$string1 =~ s/&/&amp;/g;
</PerlCode>

i want to change <br> to <br /> for that style. but using
Code: Select all
$string1 =~ s/<br>/<br /> /g;

gives me an error/ I know there is a setting in coranto settings to change in whole coranto, but i need it only for one style.
Help me pls
User avatar
web
 
Posts: 176
Joined: Sun Nov 30, 2003 3:39 pm

Postby SrNupsen » Sun Nov 11, 2007 6:00 pm

Escape the / perhaps? I don't know perl but try:

Code: Select all
$string1 =~ s/<br>/<br \/> /g
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby web » Sun Nov 11, 2007 6:12 pm

the problem seems is a '/'
User avatar
web
 
Posts: 176
Joined: Sun Nov 30, 2003 3:39 pm


Return to Troubleshooting

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron