Re: Stings - textareas in Perl...

nobull_at_mail.com
Date: 03/28/05


Date: 27 Mar 2005 20:14:36 -0800

Without any context joesplink wrote:

> I'll try to be less vague.

Please give context (quoted material) in your follow-up posts.

Also try to partition your problem - work out what is the question that
you are asking, and what is just the context in which the question
arrose.

> My PERL script gets input from a TEXTAREA
> that contains newlines. I can replace /\n/#/g and print the result
and
> see the #'s where I expect them. However, if I print the string (not
> replacing the \n's) by including it in an HTML document I send to the
> browser, it prints as a single line. How can I get it to print
showing
> the newlines as originally entered in the TEXTAREA???

It would appear that the question you are asking is how to represent a
newline in HTML.

This has nothing to do with Perl - it is a pure HTML question.

The representation of newline in HTML is <br>.

Note also that the '<' and '&' must also be represented specially in
HTML so convert your string with escapeHTML before you s/\n/<br>/.



Relevant Pages

  • Re: putting an image link into the CSS
    ... which are easily done using plain text links styled with CSS. ... element can not be substituted by a background image. ... It depends on the context and we don't know what that is. ... Ignoring that this is not HTML, I don't see how it could be more clear. ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: XHTML for teaching
    ... > There's nothing specific about your context. ... I provided a number of arguments in favor of XHTML in this ... HTML dialect that user agents understand is not formally described by ... > DTD that is as strict as the XHTML DTD. ...
    (comp.infosystems.www.authoring.html)
  • Re: Standards for presentation of numerical data for usability and accessibility
    ... matters, depending on language, authority, context, etc. ... and is certainly appropriate in relevant HTML tables. ... off-topic advice usually is. ...
    (comp.infosystems.www.authoring.html)
  • Re: Ordered lists, and how to break one up while still validating.
    ... about the whole distinction as implemented in html and css. ... Leave it to the context and the author to make it clear how ... split into an ol with ul sub lists or vice versa. ... meanings here are nowhere near the power of contexts in their capacity ...
    (alt.html)
  • Re: Line count/blank line issue with file(), etc.
    ... > Curtis wrote: ... in my code I'm converting all ... >> properly as both HTML source and viewed HTML. ... The last newline is ...
    (alt.php)