[13654] in Perl-Users-Digest
Perl-Users Digest, Issue: 1064 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 15 14:46:56 1999
Date: Fri, 15 Oct 1999 11:46:39 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <940013199-v9-i1064@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 15 Oct 1999 Volume: 9 Number: 1064
Today's topics:
How do you get real help? emlyn_a@my-deja.com
Re: How do you get real help? <gellyfish@gellyfish.com>
Re: How do you get real help? (Tad McClellan)
Re: How do you get real help? <flavell@mail.cern.ch>
Re: How do you get real help? emlyn_a@my-deja.com
Re: How do you get real help? emlyn_a@my-deja.com
Re: How do you get real help? <pdobbs@home.com>
Re: How do you parse a textarea as one line? <cassell@mail.cor.epa.gov>
Re: How do you parse a textarea as one line? (David Efflandt)
Re: How do you parse a textarea as one line? (Bart Lateur)
Re: How do you parse a textarea as one line? <flavell@mail.cern.ch>
Re: How do you parse a textarea as one line? <flavell@mail.cern.ch>
Re: How do you parse a textarea as one line? emlyn_a@my-deja.com
Re: How do you parse a textarea as one line? emlyn_a@my-deja.com
Re: How do you parse a textarea as one line? emlyn_a@my-deja.com
Re: How do you parse a textarea as one line? emlyn_a@my-deja.com
Re: How do you parse a textarea as one line? <flavell@mail.cern.ch>
Re: How do you parse a textarea as one line? <uri@sysarch.com>
Re: How do you parse a textarea as one line? <doheller@best.com>
Re: How do you parse a textarea as one line? (Tad McClellan)
Re: how to call a sub roght by form <cassell@mail.cor.epa.gov>
How to convert Seconds to a date... kkmmperl@my-deja.com
Re: How to convert Seconds to a date... <jeffp@crusoe.net>
Re: How to convert Seconds to a date... <laurensmith@sprynet.com>
Re: How to convert Seconds to a date... <amonotod@netscape.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 14 Oct 1999 12:31:44 GMT
From: emlyn_a@my-deja.com
Subject: How do you get real help?
Message-Id: <7u4ifg$gc8$1@nnrp1.deja.com>
> Yes. My first idea is that you need to learn patience when
> submitting questions to newsgroups. Sometimes you may have to
> wait *days* to get an answer.. or even longer to get the
> *right* answer.
>
> My second idea is that you are asking this in the wrong
> newsgroup. Your problem is not a Perl problem. Yes, I
> know, you're about to tell me you're writing a Perl script
> so it is a Perl problem. I can tell, since I'm using my
> PSI::ESP module. But trust me on this too. Your problem
> is an HTML issue. Not even CGI. Certainly not related
> to whatever language in which you write your script. Please
> ask this in a newsgroup with HTML in its name, so you
> can get a decent answer. I suggest that you try
> comp.infosystems.www.authoring.html .
My first idea is that you need to learn to not jump to conclusions.
This is NOT an HTML problem. My HTML skills are impeccable - in the
truest sense of the word - my Perl skills are not. If I genuinely had
problems writing a single paltry HTML form field, believe me, I would
NOT be posting it to the perl forum.
I've figured out the problem anyway, and it's very much Perl-based.
I didn't come looking for a "big brother" here, I came looking for
help. If you're not going to post something of any benefit to me, don't
bother, OK?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 14 Oct 1999 14:44:49 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How do you get real help?
Message-Id: <3805de51_2@newsread3.dircon.co.uk>
emlyn_a@my-deja.com wrote:
>
>> Yes. My first idea is that you need to learn patience when
>> submitting questions to newsgroups. Sometimes you may have to
>> wait *days* to get an answer.. or even longer to get the
>> *right* answer.
>>
>> My second idea is that you are asking this in the wrong
>> newsgroup. Your problem is not a Perl problem. Yes, I
>> know, you're about to tell me you're writing a Perl script
>> so it is a Perl problem. I can tell, since I'm using my
>> PSI::ESP module. But trust me on this too. Your problem
>> is an HTML issue. Not even CGI. Certainly not related
>> to whatever language in which you write your script. Please
>> ask this in a newsgroup with HTML in its name, so you
>> can get a decent answer. I suggest that you try
>> comp.infosystems.www.authoring.html .
>
>
> My first idea is that you need to learn to not jump to conclusions.
>
> This is NOT an HTML problem. My HTML skills are impeccable - in the
> truest sense of the word - my Perl skills are not. If I genuinely had
> problems writing a single paltry HTML form field, believe me, I would
> NOT be posting it to the perl forum.
>
But you didnt ask a Perl question . And if your HTML skills are as they say
then you wouldnt have needed to ask about the nature of the textarea.
> I've figured out the problem anyway, and it's very much Perl-based.
>
And that is ? The problem is not Perl's it is the output of the browser
that you are having difficulty with- this would be the same if you were
using Perl,Tcl, Rexx ,APL ...
/J\
--
"Virtual reality wouldn't be this wet" - Lucas, Seaquest DSV
------------------------------
Date: Thu, 14 Oct 1999 07:58:25 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How do you get real help?
Message-Id: <1hg4u7.u63.ln@magna.metronet.com>
emlyn_a@my-deja.com wrote:
: Subject: How do you get real help?
"Why Questions go Unanswered":
http://www.plover.com/~mjd/perl/Questions.html
: > Yes. My first idea is that you need to learn patience when
Standard netiquette is to provide an attribution when
you quote someone.
: I've figured out the problem anyway, and it's very much Perl-based.
I don't see (in this thread on deja) that you have shared
the solution.
I figure you are writing up another followup with that info
in it so that you can help the others here?
I am probably just too impatient. Sorry, I'm sure it will show up.
: I came looking for
: help.
Others do that too.
Help them.
Post your solution.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 14 Oct 1999 19:58:47 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: How do you get real help?
Message-Id: <Pine.HPP.3.95a.991014193335.22032D-100000@hpplus01.cern.ch>
On Thu, 14 Oct 1999 emlyn_a@my-deja.com wrote:
> My first idea is that you need to learn to not jump to conclusions.
I think you need to learn that on usenet, you are whatever you post.
And your posts have told the assembled usenauts various important things
about your usenet persona - irrespective of what kind of person you
might be in real life..
- you don't know how to present a problem appropriately for analysis on
usenet, and don't seem to be interested in learning
- you don't know how to deal with the responses that you get on usenet
- you don't know that you're supposed to share the insights that you got
here so that others can draw benefit from them
[in short, you think this is a free advice desk, with rights but
no responsibilities - a rather common symptom these days]
But...
- you _do_ know how to convince the regulars that it's going to be too
much pointless bother helping you again.
> This is NOT an HTML problem. My HTML skills are impeccable
sez you. Perhaps you'd like to explain what this confused rambling was
about, then:
I've read some questions about replacing \n with <br> tags for
paragraph breaks in a form textarea, but what if you simply want the
textarea to be written to a field as one long line (with or without
<br>s)?
knowing what (based on your own claim) you must be presumed to know
about the content of a TEXTAREA. And of course as an "impeccable" HTML
expert you'd be able to answer the question:
Does there need to be a special "wrap" tag included in the html
(virtual,physical,off) before it's sent to the cgi?
because you'd know that the procedure for submitting the contents of a
TEXTAREA are specified in the HTML specifications, with which you're
inviting us to believe you are familiar.
> I've figured out the problem anyway, and it's very much Perl-based.
You wrote it in Perl. Big deal.
> If you're not going to post something of any benefit to me, don't
> bother, OK?
Well, you've done your best to ensure that. Is that the sound of
*plonk* that I hear around the net?
------------------------------
Date: Fri, 15 Oct 1999 11:58:34 GMT
From: emlyn_a@my-deja.com
Subject: Re: How do you get real help?
Message-Id: <7u74t5$cnq$1@nnrp1.deja.com>
> But you didnt ask a Perl question . And if your HTML skills are as
they say
> then you wouldnt have needed to ask about the nature of the textarea.
The question IS about Perl, namely: "How do you PARSE the data from a
textarea and remove linebreaks/carriage returns in order for it to be
written to a data file as a field of a single line?"
Now tell me, does that SOUND like friggin' HTML to you??
> And that is ? The problem is not Perl's it is the output of the
browser
> that you are having difficulty with- this would be the same if you
were
> using Perl,Tcl, Rexx ,APL ...
As some others had pointed out, it is a cause of Macs using \r or \n
differently than PC's, which requires substituting the right elements,
instead of the vanilla s/\n\r/ /g (or whatever) that I've used for
anything else.
So... What I'm doing is taking someone advice and using the binary
format to understand how Mac is reading in the data. I can go from
there.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 15 Oct 1999 12:18:22 GMT
From: emlyn_a@my-deja.com
Subject: Re: How do you get real help?
Message-Id: <7u7624$dh7$1@nnrp1.deja.com>
> I think you need to learn that on usenet, you are whatever you post.
>
> And your posts have told the assembled usenauts various important
things
> about your usenet persona - irrespective of what kind of person you
> might be in real life..
>
> - you don't know how to present a problem appropriately for analysis
on
> usenet, and don't seem to be interested in learning
>
> - you don't know how to deal with the responses that you get on usenet
>
> - you don't know that you're supposed to share the insights that you
got
> here so that others can draw benefit from them
>
> [in short, you think this is a free advice desk, with rights but
> no responsibilities - a rather common symptom these days]
>
> But...
>
> - you _do_ know how to convince the regulars that it's going to be too
> much pointless bother helping you again.
>
> > This is NOT an HTML problem. My HTML skills are impeccable
>
> sez you. Perhaps you'd like to explain what this confused rambling
was
> about, then:
>
> I've read some questions about replacing \n with <br> tags for
> paragraph breaks in a form textarea, but what if you simply want the
> textarea to be written to a field as one long line (with or without
> <br>s)?
>
> knowing what (based on your own claim) you must be presumed to know
> about the content of a TEXTAREA. And of course as an "impeccable"
HTML
> expert you'd be able to answer the question:
>
> Does there need to be a special "wrap" tag included in the html
> (virtual,physical,off) before it's sent to the cgi?
>
> because you'd know that the procedure for submitting the contents of a
> TEXTAREA are specified in the HTML specifications, with which you're
> inviting us to believe you are familiar.
>
> > I've figured out the problem anyway, and it's very much Perl-based.
>
> You wrote it in Perl. Big deal.
>
> > If you're not going to post something of any benefit to me, don't
> > bother, OK?
>
> Well, you've done your best to ensure that. Is that the sound of
> *plonk* that I hear around the net?
>
Wait a minute: I came here with the best intentions, to find out if
anyone had encountered this problem before, and to hopefully share my
findings IF AND WHEN I ACTUALLY FIGURED IT OUT. I was lucky enough to
figure it out, but if some guy (David Cassell) is gonna respond with
useless "stay-away-from-our-turf" mentality, and IMMEDIATELY gets on my
case about how this isn't even a Perl problem WITHOUT even trying to
hint at a solution then, what can I say? Where is this wondrous spirit
of sharing you're on about? Give me something to try and I'll share my
findings, damnit!
I said my HTML skills are impeccable - I know how this reads, but
believe me they are. Perhaps I should have said my HTML WRITING skills
are impeccable, not my knowledge of how data is passed from form
fields - I'm humbled by that. What I didn't say is that I knew how Perl
would react differently to the parsing of the DATA IN A TEXTAREA based
on whether I'm running it on a Mac or a PC, and I certainly never
thought it would come down to figuring it out from the binary output.
Now is that so unreasonable??
What concerns me - based on the reponses so far - with the exception of
a few - is that everyone seems just as perplexed by this problem as I
am. That makes me feel a whole lot better...
I genuinely had the best intentions, but don't jump on the new guy
because he doesn't know the secret handshake, OK?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 15 Oct 1999 15:17:33 GMT
From: Paul D <pdobbs@home.com>
Subject: Re: How do you get real help?
Message-Id: <380746B2.6F5DCEEE@home.com>
This guy's reply was truly stupid bitterness. I've seen a few of
them in here. I for one look at it as there being very LITTLE
separation of Perl from CGI and even in some cases, HTML problems
because Perl is heavily used for working with, around, and managing
HTML.
HTML is text.. Perl is a text manipulator. Whats the problem about
asking questions in a MISC newsgroup for frig sakes right?
Ask away. Email me if you like too, I'm happy to lend a hand. It
sort of lets me return the help I ask for from here at times. I
love a good programming challenge, and lately, 100% of what I am
messing with is CGI/HTML issues. :-)
Have a look-see of my "one liner" Graffiti wall for example.
http://24.112.27.28/cgi-bin/PaulsWall.cgi
Does a nifty job of taking in form data, extracting URL info
to create a clickable link (and email links) and colours.
http://24.112.27.28/cgi-bin/PDMsg2.cgi
A more involving project I got into and am focused on. Its
a message forum system I'm making to rival the one called
UBB (because I'm not paying $230 bloody dollars for UBB!)
Paul
pdobbs@home.com
emlyn_a@my-deja.com wrote:
>
> > Yes. My first idea is that you need to learn patience when
> > submitting questions to newsgroups. Sometimes you may have to
> > wait *days* to get an answer.. or even longer to get the
> > *right* answer.
> >
> > My second idea is that you are asking this in the wrong
> > newsgroup. Your problem is not a Perl problem. Yes, I
> > know, you're about to tell me you're writing a Perl script
> > so it is a Perl problem. I can tell, since I'm using my
> > PSI::ESP module. But trust me on this too. Your problem
> > is an HTML issue. Not even CGI. Certainly not related
> > to whatever language in which you write your script. Please
> > ask this in a newsgroup with HTML in its name, so you
> > can get a decent answer. I suggest that you try
> > comp.infosystems.www.authoring.html .
>
> My first idea is that you need to learn to not jump to conclusions.
>
> This is NOT an HTML problem. My HTML skills are impeccable - in the
> truest sense of the word - my Perl skills are not. If I genuinely had
> problems writing a single paltry HTML form field, believe me, I would
> NOT be posting it to the perl forum.
>
> I've figured out the problem anyway, and it's very much Perl-based.
>
> I didn't come looking for a "big brother" here, I came looking for
> help. If you're not going to post something of any benefit to me, don't
> bother, OK?
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Tue, 12 Oct 1999 15:42:09 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How do you parse a textarea as one line?
Message-Id: <3803B941.C2FBE321@mail.cor.epa.gov>
[this is the second message from emlyn in 3 hours and 9 minutes]
emlyn@cimedia.com wrote:
>
> I've read some questions about replacing \n with <br> tags for
> paragraph breaks in a form textarea, but what if you simply want the
> textarea to be written to a field as one long line (with or without
> <br>s)?
>
> Does there need to be a special "wrap" tag included in the html
> (virtual,physical,off) before it's sent to the cgi? I've tried all
> kinds of approaches (using MacPerl), but for every linebreak, it
> inserts an unrecognizable square character - very strange.
>
> Hope there are some ideas out there...
Yes. My first idea is that you need to learn patience when
submitting questions to newsgroups. Sometimes you may have to
wait *days* to get an answer.. or even longer to get the
*right* answer.
My second idea is that you are asking this in the wrong
newsgroup. Your problem is not a Perl problem. Yes, I
know, you're about to tell me you're writing a Perl script
so it is a Perl problem. I can tell, since I'm using my
PSI::ESP module. But trust me on this too. Your problem
is an HTML issue. Not even CGI. Certainly not related
to whatever language in which you write your script. Please
ask this in a newsgroup with HTML in its name, so you
can get a decent answer. I suggest that you try
comp.infosystems.www.authoring.html .
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 13 Oct 1999 05:45:02 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: How do you parse a textarea as one line?
Message-Id: <slrn80873p.aa.efflandt@efflandt.xnet.com>
On Tue, 12 Oct 1999 19:21:52 GMT, emlyn@cimedia.com <emlyn@cimedia.com> wrote:
>I've read some questions about replacing \n with <br> tags for
>paragraph breaks in a form textarea, but what if you simply want the
>textarea to be written to a field as one long line (with or without
><br>s)?
>
>Does there need to be a special "wrap" tag included in the html
>(virtual,physical,off) before it's sent to the cgi? I've tried all
>kinds of approaches (using MacPerl), but for every linebreak, it
>inserts an unrecognizable square character - very strange.
A text area from web forms end lines with carriage return and linefeed
(\r\n). What does the Mac use for line endings (I heard just carriage
return). So you could parse out just the /\n/ or convert the line endings
to something else s/\r\n/<br>/ depending upon what you want to end up
with.
--
David Efflandt efflandt@xnet.com http://www.xnet.com/~efflandt/
http://www.de-srv.com http://cgi-help.virtualave.net/
http://thunder.prohosting.com/~cv-elgin/
------------------------------
Date: Wed, 13 Oct 1999 07:14:17 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: How do you parse a textarea as one line?
Message-Id: <380a3143.4276844@news.skynet.be>
emlyn@cimedia.com wrote:
>I've read some questions about replacing \n with <br> tags for
>paragraph breaks in a form textarea, but what if you simply want the
>textarea to be written to a field as one long line (with or without
><br>s)?
There's a html attribute for TEXTAREA that does that: WRAP. set to
"OFF", "PHYSICAL" or "VIRTUAL" (this is the one you want). AFAIK only
works with Netscape.
ALternatively, try this in the script:
tr/\r\n//s;
It will replace all common line ends with just ONE space.
>Does there need to be a special "wrap" tag included in the html
>(virtual,physical,off) before it's sent to the cgi? I've tried all
>kinds of approaches (using MacPerl), but for every linebreak, it
>inserts an unrecognizable square character - very strange.
Not so strange: It's the linefeed (Ascii code 10). The Mac uses CR only
(Ascii code 13) as end-of-line marker. Unix uses LF only; PC uses CR+LF.
Try, in a local copy, making the "FORM" tag just "<FORM>". If you
"post", it will do nothing, but you'll see the form data appear in the
URL. Look out for "%0D%0A" sequences: that is the CR+LF encoded. You can
convert them to one single newline, whatever your system, by this
statement (after decoding):
s/\015\012/\n/g;
--
Bart.
------------------------------
Date: Wed, 13 Oct 1999 13:14:42 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: How do you parse a textarea as one line?
Message-Id: <Pine.HPP.3.95a.991013125946.22897C-100000@hpplus01.cern.ch>
On 13 Oct 1999, David Efflandt wrote:
> A text area from web forms end lines with carriage return and linefeed
> (\r\n).
Please don't do that! When you are in a cross-platform situation
you cannot simply identify \r with carriage-return and \n with linefeed.
\n in Perl is the newline, whatever it may be (carriage return on the
Mac).
And there's additional opportunity for confusion if what you are
handling are not native text records, but raw HTTP-protocol records.
_They_ are _supposed_ to be always terminated with CR+LF, but clients
are told to be tolerant of other conventions.
You need to sit down calmly and work out what you're going to do, e.g.
1. Handle the raw data stream as "binary", with the control characters
represented in the code by \015 and \012 (CR, LF). In this context,
using (or even talking about) \n and \r brings guaranteed confusion if
you aim to write a cross-platform script.
2. somehow convert the HTTP data stream into the local conventions for
text records, and then do the parsing as for text records, i.e in
this context you can and should parse those with \n meaning newline.
But first you need to get that HTTP (binary) data stream into local
text record format.
OK, there are other possible approaches too. Those are just the obvious
ones.
> What does the Mac use for line endings (I heard just carriage
> return).
You see, that's the problem!
------------------------------
Date: Wed, 13 Oct 1999 13:26:22 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: How do you parse a textarea as one line?
Message-Id: <Pine.HPP.3.95a.991013131914.22897E-100000@hpplus01.cern.ch>
On Wed, 13 Oct 1999, Bart Lateur wrote:
> emlyn@cimedia.com wrote:
>
> >I've read some questions about replacing \n with <br> tags for
> >paragraph breaks in a form textarea, but what if you simply want the
> >textarea to be written to a field as one long line (with or without
> ><br>s)?
This is not a Perl question. The way the question is formulated shows
that the questioner is confused about HTML markup on the one hand, and
how form content is submitted on the other hand. (The confusion over
what \n means in cross-platform Perl is an additional complication).
I suspect that the Perl answer is CGI.pm, as usual. But the HTML issues
should be discussed on their proper group.
> There's a html attribute for TEXTAREA that does that: WRAP.
With respect, No, there isn't, not in standard HTML. There's a
vendor-extension WRAP attribute of TEXTAREA, that will make the problem
more complex, and in some variations will produce an insoluble dilemma
(trying to distinguish between newlines that were really typed by the
user, and newlines that have been added by the browser) that wasn't
there before.
all the best
------------------------------
Date: Thu, 14 Oct 1999 12:32:49 GMT
From: emlyn_a@my-deja.com
Subject: Re: How do you parse a textarea as one line?
Message-Id: <7u4ihh$gck$1@nnrp1.deja.com>
Thanks! I had already tried \n and \r, but maybe a combo is the way
it's done...
I'll give it a shot.
E.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 14 Oct 1999 12:39:34 GMT
From: emlyn_a@my-deja.com
Subject: Re: How do you parse a textarea as one line?
Message-Id: <7u4iu4$gni$1@nnrp1.deja.com>
Now that's what I call help!
I'm pretty sure I tried the \r instead of \n substitution, but it never
worked, even when I messed with all three settings
(OFF,PHYSICAL,VIRTUAL), but it never took.
However, based on what you've told me, I'll try this approach.
Thanks again.
E.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 14 Oct 1999 12:36:14 GMT
From: emlyn_a@my-deja.com
Subject: Re: How do you parse a textarea as one line?
Message-Id: <7u4int$gm6$1@nnrp1.deja.com>
Convert textarea value to binary? Er...
I'm just testing this script on a Mac, even though I'd be quite happy
gearing it for PC. I just want to be sure that there is a standard
method for parsing a textarea as opposed to a regular text field into a
single line of text that can used as a field from a Perl script.
Thanks.
E.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 14 Oct 1999 12:42:12 GMT
From: emlyn_a@my-deja.com
Subject: Re: How do you parse a textarea as one line?
Message-Id: <7u4j31$gpq$1@nnrp1.deja.com>
> With respect, No, there isn't, not in standard HTML. There's a
> vendor-extension WRAP attribute of TEXTAREA, that will make the
problem
> more complex, and in some variations will produce an insoluble dilemma
> (trying to distinguish between newlines that were really typed by the
> user, and newlines that have been added by the browser) that wasn't
> there before.
It doesn't matter: I completely took out the wrap feature anyway, and
it STILL didn't work.
E.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 14 Oct 1999 19:33:19 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: How do you parse a textarea as one line?
Message-Id: <Pine.HPP.3.95a.991014173544.22032C-100000@hpplus01.cern.ch>
On Thu, 14 Oct 1999 emlyn_a@my-deja.com wrote:
> it STILL didn't work.
Oh dear.
(Well, what more can one say, when presented with such a problem
report?)
------------------------------
Date: 14 Oct 1999 15:26:57 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: How do you parse a textarea as one line?
Message-Id: <x7d7uhkake.fsf@home.sysarch.com>
>>>>> "AJF" == Alan J Flavell <flavell@mail.cern.ch> writes:
AJF> On Thu, 14 Oct 1999 emlyn_a@my-deja.com wrote:
>> it STILL didn't work.
AJF> Oh dear.
AJF> (Well, what more can one say, when presented with such a problem
AJF> report?)
well you could at least try to help! just run:
perl -MPSI::ESP -e 'divine_problem()'
how annoying that you didn't even lift a finger to help her. what kind
of gentleman perl hacker do you claim to be? as a fine upstanding member
of the clpm cabal, i must demand you unsubscribe from this group
forthwith and never darken my towels again!
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Thu, 14 Oct 1999 15:36:25 -0700
From: "David Heller" <doheller@best.com>
Subject: Re: How do you parse a textarea as one line?
Message-Id: <38065ae3$0$225@nntp1.ba.best.com>
Just had this same problem for a form that had to be emailed with \n intact,
and displayed on screen in html.
In subroutine to display on web page:
my $renter_mail_address =~ s/\n/<br>/ig; # changes \n to <br>
Works for every browser we've tried so far.
Dave Heller
------------------------------
Date: Thu, 14 Oct 1999 19:09:48 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How do you parse a textarea as one line?
Message-Id: <srn5u7.e54.ln@magna.metronet.com>
David Heller (doheller@best.com) wrote:
: my $renter_mail_address =~ s/\n/<br>/ig; # changes \n to <br>
^
^
What is the point of ignoring the case of letters when
you do not have any letters in your pattern?
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 12 Oct 1999 15:31:26 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: how to call a sub roght by form
Message-Id: <3803B6BE.97659AAA@mail.cor.epa.gov>
Speaking of the following hideous piece of drek:
> >>>read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
Yuval Hamberg wrote:
>
> I sow it in 5 different script on the net. what do you know there are a few
> people that know less than I so! :)
A lot more than 'a few', apparently. This is but one of the
many awful dweomers that have spread across the Perl scripts of
the Web like a cancer. Huge numbers fail to do this right,
or to fix month/year correctly, or to parse HTML right, or to
decode...
Oh, what's the point. Look, don't assume that code found
on the web is good unless the *source* of the code is
reliable.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 13 Oct 1999 16:47:34 GMT
From: kkmmperl@my-deja.com
Subject: How to convert Seconds to a date...
Message-Id: <7u2d30$v4j$1@nnrp1.deja.com>
Hi,
My question is, Is there a function that I can use to
convert seconds back to a date. (i.e) function_name(0) means January
1, 1970 and so on.
Thank you very much.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 13 Oct 1999 13:11:46 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: How to convert Seconds to a date...
Message-Id: <Pine.GSO.4.10.9910131311080.14462-100000@crusoe.crusoe.net>
[posted & mailed]
On Oct 13, kkmmperl@my-deja.com blah blah blah:
> My question is, Is there a function that I can use to
> convert seconds back to a date. (i.e) function_name(0) means January
> 1, 1970 and so on.
This is a builtin function.
perldoc -f localtime
--
jeff pinyan japhy@pobox.com
perl stuff japhy+perl@pobox.com
CPAN ID: PINYAN http://www.perl.com/CPAN/authors/id/P/PI/PINYAN
------------------------------
Date: Wed, 13 Oct 1999 10:32:14 -0700
From: "Lauren Smith" <laurensmith@sprynet.com>
Subject: Re: How to convert Seconds to a date...
Message-Id: <7u2fn5$sk2$1@brokaw.wa.com>
kkmmperl@my-deja.com wrote in message <7u2d30$v4j$1@nnrp1.deja.com>...
> My question is, Is there a function that I can use to
>convert seconds back to a date. (i.e) function_name(0) means January
>1, 1970 and so on.
Umm...
perldoc -f localtime ?
There's got to be more to the question than just that, though... right?
Lauren
------------------------------
Date: Wed, 13 Oct 1999 17:45:21 GMT
From: amonotod <amonotod@netscape.net>
Subject: Re: How to convert Seconds to a date...
Message-Id: <7u2gfe$1tf$1@nnrp1.deja.com>
In article <7u2d30$v4j$1@nnrp1.deja.com>,
kkmmperl@my-deja.com wrote:
> Hi,
> My question is, Is there a function that I can use to
> convert seconds back to a date. (i.e) function_name(0) means January
> 1, 1970 and so on.
>
> Thank you very much.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
From the perlfaq3,
How do I find the week-of-the-year/day-of-the-year?
The day of the year is in the array returned by localtime() (see
perlfunc):
$day_of_year = (localtime(time()))[7];
or more legibly (in 5.004 or higher):
use Time::localtime;
$day_of_year = localtime(time())->yday;
You can find the week of the year by dividing this by 7:
$week_of_year = int($day_of_year / 7);
Of course, this believes that weeks start at zero. The Date::Calc module
from CPAN has a lot of date
calculation functions, including day of the year, week of the year, and
so on. Note that not all businesses
consider ``week 1'' to be the same; for example, American businesses
often consider the first week with a
Monday in it to be Work Week #1, despite ISO 8601, which considers WW1
to be the first week with a
Thursday in it.
HTH,
amonotod
--
`\|||/ amonotod@
(@@) netscape.net
ooO_(_)_Ooo________________________________
_____|_____|_____|_____|_____|_____|_____|_____|
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 1064
**************************************