pattern \n\n (which would indicate
> the existence of an
> empty line. For example: "Some paragraph text\n\nA
I've got my solution, it's something like yours, and
it works fine. The main difference was I explicitely
used \x0d and \x0a because I wasn't sure if \n and \r
were defin
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
EXTAREA tag to one or more HTML paragraphs. That means any newlines
> entered into the text box need to be turned into P tags by the script.
> But I'm having trouble coming up with a regex to do this. I know I need
> multiline mode, so I've been trying combinations involving "
cr/lf for
newlines? Is anyone bored enough to go look?
>
> what I am not getting in these debates is why one should do
>
> my $cr = chr(13);
> my $lf = chr(10);
> my $eol = "$cr|$lf";
>
> as opposed to leaving it to perl as
>
> my $eo
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
> h
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
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
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
Hello, all,
I'm trying to translate the value entered in a
TEXTAREA tag to one or more HTML paragraphs. That
means any newlines entered into the text box need to
be turned into P tags by the script. But I'm having
trouble coming up with a regex to do this. I know I
need multilin
> -Original Message-
> From: Wendy DeCora [mailto:[EMAIL PROTECTED]]
> Sent: 23 August 2001 16:13
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: sendmail and newlines
>
>
> Situation: My perl script (see Code: below) is being
> handed a flatfile
by a list
administrator through an oracle tool (I think, I
didn't develop that in anyway) and the ability to have
newlines is necessary for formatting. The problem is
when this message is dumped into the flatfile, the
newlines are still in it and cause the script to go
nuts.
My idea was to hav
Hello Sergio,
Thursday, July 26, 2001, Sergio Gonzalez <[EMAIL PROTECTED]> wrote:
SG> Hi,
SG> I'm wondering how to make sure that when my data is written to a file, a
SG> proper end of line is in place after ea. intended line.
it's not your job. leave it to operating system.
SG> code:
SG> .
Hi,
I'm wondering how to make sure that when my data is written to a file, a
proper end of line is in place after ea. intended line.
code:
...
# now loop and append the data to the file
# Loop thru hash and write data
foreach $value(values %cgidata) {
if ($debug > 0) { print "Writin
20 matches
Mail list logo