--- Matthew Weier O'Phinney
<[EMAIL PROTECTED]> wrote:
> I've gone through and read all the other posts in
> reply to this, and they
> all seem to ignore a very simple solution.
>
> First: strip off the \r\n:
> s/\r\n/\n/sg
>
> Then look for the pattern \n\n (which would indicate
> the existence
drieux wrote:
> but if you wanted to 'clean em all'
>
> $line =~ s/[$eol]+/\n/g
>
> would find the case of
>
> \r
> \r\n
> \n
> \r\n\n
>
>
> and replace them all with a single '\n' for all
> occurances in the $line that one is going through
wouldn't this reg
On Tuesday, May 21, 2002, at 05:52 , Jake wrote:
[..]
> If the latter method works, that's cool, i havent tested it. I will admit
> that as I learn this stuff, I tend to do everything the hard way first,
> then trim it down.
I have test it on [darwin|solaris|redhat linux 7.2] - I could
get ove
I've gone through and read all the other posts in reply to this, and they
all seem to ignore a very simple solution.
First: strip off the \r\n:
s/\r\n/\n/sg
Then look for the pattern \n\n (which would indicate the existence of an
empty line. For example: "Some paragraph text\n\nA new paragraph")
> so I guess the question is - presume that it is either or
> and rip them all out before proceding anyway
IMHO I think one should presume that it is that way...Thats why we go to the
trouble to have standards isnt it? so that everyone doesnt have to go around
doing custom work for every
On Tuesday, May 21, 2002, at 05:58 , Felix Geerinckx wrote:
> on Tue, 21 May 2002 12:35:59 GMT, [EMAIL PROTECTED] (Bob
> Showalter) wrote:
>
>> This is dependent on the browser, and not the client OS. The
>> HTML standard would be controlling here, and it's pretty
>> vague if you look at the TEX
on Tue, 21 May 2002 12:35:59 GMT, [EMAIL PROTECTED] (Bob
Showalter) wrote:
> This is dependent on the browser, and not the client OS. The
> HTML standard would be controlling here, and it's pretty
> vague if you look at the TEXTAREA section.
It was somewhat less vague in the 'HTML 3.2 Referenc
> -Original Message-
> From: Jake [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 20, 2002 5:18 PM
> To: John Brooking; Beginners CGI
> Subject: Re: Translating newlines to HTML paragraphs
>
> ... My guess though is that textarea newlines will get sent
> as cr/
On Monday, May 20, 2002, at 07:36 , John Brooking wrote:
> --- drieux <[EMAIL PROTECTED]> wrote:
>> use CGI qw/:standard/;
>>
>> for a specific illustration cf:
>>
> http://www.wetware.com/drieux/pbl/cgi/basicPagePopper.txt
[..]
> The code I included in the message was just
> my test scrip
--- drieux <[EMAIL PROTECTED]> wrote:
>
> maybe I am missing something here - but isn't
> this something you would want to be using say
>
> use CGI qw/:standard/;
>
> for a specific illustration cf:
>
http://www.wetware.com/drieux/pbl/cgi/basicPagePopper.txt
Either you're missing somethi
--- Jake <[EMAIL PROTECTED]>
wrote:
>
> On my machine (linux) if I dump textarea input to a
> ascii text file like so...
>
> my $ta = $query->param('myTextArea');
> print outFile $ta;
>
> newlines are saved as cr/lf which corresponds to the
> hex characters 0D and 0A.
>
> ... [snip stuff abou
On my machine (linux) if I dump textarea input to a ascii text file like so...
my $ta = $query->param('myTextArea');
print outFile $ta;
newlines are saved as cr/lf which corresponds to the hex characters 0D and 0A.
If I look at this file with some text editors it will look like ^M . but it's
True, but if I am trying to repeatedly translate in
both directions, won't this cause the newlines to
grow? For example (P tags shown as [p] here):
TEXTAREA sends "Para 1.\nPara 2.\nPara 3."
I store: "Para 1.\n[p]Para 2.\n[p]Para 3."
Translated back for TEXTAREA next time:
"Para 1.
On Monday, May 20, 2002, at 10:51 , John Brooking wrote:
>
> Thanks in advance for any help.
>
> - John
maybe I am missing something here - but isn't
this something you would want to be using say
use CGI qw/:standard/;
for a specific illustration cf:
http://www.wetware.com/dr
On Monday 20 May 2002 01:51 pm, John Brooking wrote:
> Hello, all,
> has worked so far. Everything I've tried has (1) added
> the P tag but not removed the newline, and/or (2) also
the first case should work, after all, the browser will ignore newline and
carriage return characters, so
15 matches
Mail list logo