|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Here's the deal, a user enters info into a text form field and it is the added to a text file database. I am having trouble because if the user hits enter in the form field it will skip lines in the text file database, which casues the database to get all wacky. I am wondering if anyone knows of a way to turn those returns into "<br>" or to just delete them all together. Any input would be greatly appreciated! Thank you!
|
|
#2
|
|||
|
|||
|
$input{'formFieldName'} =~ s/r//g; #get rid of carriage returns
$input{'formFieldName'} =~ s/n{2,}/<P>/g; #substitute multiple newlines with one paragraph tag $input{'formFieldName'} =~ s/n/<BR>/g; #substitute any remaining newlines with line break tags |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Getting rid of returns in form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|