Welcome to Dream.In.Code
Become an Expert!

Join 149,954 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,332 people online right now. Registration is fast and FREE... Join Now!




Sending Formatted Text To A Cgi Script

 
Reply to this topicStart new topic

Sending Formatted Text To A Cgi Script, text area formatting

graeder
2 Mar, 2003 - 11:56 AM
Post #1

New D.I.C Head
*

Joined: 17 Dec, 2002
Posts: 22

Just wondering if there is a way to send formatted text to a cgi script. In other words, I want the text in a text area that is entered by the user to be sent as is. If the user hits enter to create a new line I would like this to be sent to the cgi script.
User is offlineProfile CardPM
+Quote Post

iamcenz
RE: Sending Formatted Text To A Cgi Script
2 Mar, 2003 - 02:42 PM
Post #2

You wish you were my hand!
Group Icon

Joined: 26 Mar, 2001
Posts: 2,385


Dream Kudos: 201
My Contributions
i know nothing about Perl but from what i here it is alot like php. with php there is a string replace function. there should be something like that for Perl also
User is offlineProfile CardPM
+Quote Post

klewlis
RE: Sending Formatted Text To A Cgi Script
2 Mar, 2003 - 03:12 PM
Post #3

cur tu me vexas?
*****

Joined: 9 Nov, 2001
Posts: 1,723

in perl you'd use a regular expression. i'm a little rusty, but something like this:
CODE

$string =~ s/\n/\<br\>/g;


ie: switching the newlines with <br> tags. you could then see if there were any double br tags and replace those with </p><p> if you wanted...
User is offlineProfile CardPM
+Quote Post

graeder
RE: Sending Formatted Text To A Cgi Script
14 Mar, 2003 - 08:58 PM
Post #4

New D.I.C Head
*

Joined: 17 Dec, 2002
Posts: 22

thanks, I'll try that. That makes sense.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 06:00PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month