[11380] in Perl-Users-Digest
Perl-Users Digest, Issue: 4979 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 26 11:37:43 1999
Date: Fri, 26 Feb 99 08:33:56 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 26 Feb 1999 Volume: 8 Number: 4979
Today's topics:
How to make CGI scripts? <julius@clara.net>
Re: How to make CGI scripts? <Allan@due.net>
How to run a script from a script <marnic@ludomedia.ch>
Re: How to run a script from a script <jglascoe@giss.nasa.gov>
Re: How to run a script from a script (Nobody)
How to run another script in my script? <rlei@mail.com>
Re: How to run another script in my script? <ebohlman@netcom.com>
Re: How to run another script in my script? wyndo@cxo.com
Re: How to run another script in my script? (Tad McClellan)
Re: How to run another script in my script? (Clay Irving)
Re: How to run another script in my script? <aqumsieh@matrox.com>
Re: How to run another script in my script? (Tad McClellan)
Re: How to run another script in my script? (David Efflandt)
How to send an error msg on die ? thst@my-dejanews.com
Re: How to send an error msg on die ? droby@copyright.com
Re: How to send an error msg on die ? <Colin@Chaplin.sol.co.uk>
Re: How to send an error msg on die ? <Allan@due.net>
How to send SMS messages <peter.herger@swisslife.ch>
Re: How to send SMS messages <gellyfish@btinternet.com>
How to Split This String? yxw1@yahoo.com
Re: How to Split This String? (Clay Irving)
Re: How to Split This String? (Abigail)
Re: How to Split This String? (Tad McClellan)
Html e-mail in Perl boris.tang@connection.com.hk
Re: Html e-mail in Perl <kenhirsch@myself.com>
Re: Html e-mail in Perl (Clay Irving)
Re: Html e-mail in Perl (Abigail)
Re: Html e-mail in Perl (Abigail)
Re: Html e-mail in Perl <kenhirsch@myself.com>
Re: Html e-mail in Perl (Ronald J Kimball)
Re: Html e-mail in Perl dragnovich@my-dejanews.com
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 23 Feb 1999 20:34:37 GMT
From: "Jules" <julius@clara.net>
Subject: How to make CGI scripts?
Message-Id: <xhEA2.438$uJ1.163@nnrp3.clara.net>
Dear all, I wrote this:
#!/usr/bin/perl
print <<END
Content-type: text/html
<HTML>
<HEAD><TITLE>Test</TITLE></HEAD>
</BODY>
<H1>Testing</H1>
</BODY>
</HTML>
END
saved it as simple.cgi and loaded it on my web browser, it would only
display the contents of it, but won't run it. How come? Please help...
Cheers,
Jules
*You cannot strengthen the weak by weakening the strong*
------------------------------
Date: Tue, 23 Feb 1999 15:57:49 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: How to make CGI scripts?
Message-Id: <7av4cj$ahs$1@samsara0.mindspring.com>
Jules wrote in message ...
:Dear all, I wrote this:
:
:#!/usr/bin/perl
:print <<END
:Content-type: text/html
:
:<HTML>
:<HEAD><TITLE>Test</TITLE></HEAD>
:</BODY>
:<H1>Testing</H1>
:</BODY>
:</HTML>
:
:END
:saved it as simple.cgi and loaded it on my web browser, it would only
:display the contents of it, but won't run it. How come? Please help...
Well first of all make sure your web server is set up correctly because
browsers don't execute scripts, web servers do. If you don't have a server
installed check out www.apache.org for a great free server.
Once you are sure that the server is running successfully check out perlfaq9
which has the entry:
-------
My CGI script runs from the command line but not the browser. Can you help
me fix it?
Sure, but you probably can't afford our contracting rates :-)
Seriously, if you can demonstrate that you've read the following FAQs and
that your problem isn't something simple that can be easily answered, you'll
probably receive a courteous and useful reply to your question if you post
it on comp.infosystems.www.authoring.cgi (if it's something to do with HTTP,
HTML, or the CGI protocols). Questions that appear to be Perl questions but
are really CGI ones that are posted to comp.lang.perl.misc may not be so
well received.
The useful FAQs are:
http://www.perl.com/perl/faq/idiots-guide.html
http://www3.pair.com/webthing/docs/cgi/faqs/cgifaq.shtml
http://www.perl.com/perl/faq/perl-cgi-faq.html
http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html
http://www.boutell.com/faq/
----------
Although oddly titled the first FAQ is very helpful.
HTH
AmD
--
$email{'Allan M. Due'} = ' Allan@Due.net ';
--random quote --
If a man does not keep pace with his companions, perhaps it is
because he hears a different drummer. Let him step to the music which
he hears, however measured or far away.
Thoreau
------------------------------
Date: Tue, 23 Feb 1999 23:11:03 +0100
From: Marc Nicole <marnic@ludomedia.ch>
Subject: How to run a script from a script
Message-Id: <36D32777.50A4B1D@ludomedia.ch>
Hi,
I can't figure out how to execute a script from a sript, it's maybe
because I don't know unix :-)
anyone may help ?
regards,
Marnic
_____________________________________________________________________
L U D O M E D I A http://www.ludomedia.ch
------------------------- Phone: ++ 41 21 311.60.93
G A M E - D E S I G N mailto:marnic@ludomedia.ch
_____________________________________________________________________
------------------------------
Date: Tue, 23 Feb 1999 19:59:20 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: marnic@ludomedia.ch
Subject: Re: How to run a script from a script
Message-Id: <36D34EE8.1F32FB98@giss.nasa.gov>
[courtesy copy sent to cited author via email]
Marc Nicole wrote:
>
> Hi,
>
> I can't figure out how to execute a script from a sript, it's maybe
> because I don't know unix :-)
a Perl script from a Perl script? Use "do":
my $retval = do '/path/to/your/script.pl';
unless (defined $retval) { die "AAAAHHH!" }
But you should probably check the documentation:
$ perldoc -f do
--
"'C' is for 'Cookie'. That's good enough for me."
--Cookie Monster
------------------------------
Date: 24 Feb 1999 01:47:08 GMT
From: nobody@dewpoint.eng.sun.com (Nobody)
Subject: Re: How to run a script from a script
Message-Id: <7avlms$9a$1@engnews2.Eng.Sun.COM>
In article <36D32777.50A4B1D@ludomedia.ch> marnic@ludomedia.ch writes:
>Hi,
>
>I can't figure out how to execute a script from a sript, it's maybe
>because I don't know unix :-)
>
>anyone may help ?
>
You mean like,
[. . .]
system("new_script.pl $argument1 $argument2");
[. . .]
EDEW
------------------------------
Date: Sun, 21 Feb 1999 20:12:40 -0400
From: "Randy, G.C. Lei" <rlei@mail.com>
Subject: How to run another script in my script?
Message-Id: <919642391.664119@klaatu.wolf>
I did this before, I use
system("perl myscript.cgi");
I know this is a good way to do it, but I just wrote something like this and
it didn't work,
anyone has any idea?
--------------------------------
Randy, Garn-Chiun Lei
rlei@mail.com
------------------------------
Date: Tue, 23 Feb 1999 09:16:20 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: How to run another script in my script?
Message-Id: <ebohlmanF7LoF8.DDG@netcom.com>
Tad McClellan <tadmc@metronet.com> wrote:
: How can I generate a random line number in Perl for use in Usenet
: followups to articles that don't give enough information?
I think we need to practice a little memetic engineering here.
The tale we want to spread is that, ever since Larry wrote the first
perl, there's been a mysterious bug that causes the otherwise-excellent
error-checking facilities invoked by -w, use strict, etc. to completely
fail to detect erroneous constructs whenever they appear on line 17 of a
program. Larry has been unable to fix this bug in ten years.
Therefore, since anyone asking "what's wrong with my code?" will
certainly have invoked these excellent facilities, the problem *must* lie
on line 17, because otherwise the poster would have seen the appropriate
error/warning messages and fixed the problem already.
------------------------------
Date: Tue, 23 Feb 1999 20:40:47 GMT
From: wyndo@cxo.com
Subject: Re: How to run another script in my script?
Message-Id: <7av3od$5m$1@nnrp1.dejanews.com>
> : >Randy, G.C. Lei (rlei@mail.com) wrote:
> : >: I did this before, I use
> : >: system("perl myscript.cgi");
> : >: I know this is a good way to do it, but I just wrote something like this
and
> : >: it didn't work,
> : >: anyone has any idea?
I use:
do "myscript.cgi"
instead....?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 22 Feb 1999 02:46:47 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to run another script in my script?
Message-Id: <712ra7.km1.ln@magna.metronet.com>
Randy, G.C. Lei (rlei@mail.com) wrote:
: I did this before, I use
: system("perl myscript.cgi");
: I know this is a good way to do it, but I just wrote something like this and
: it didn't work,
: anyone has any idea?
You have an error on line 17.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 22 Feb 1999 09:20:25 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: How to run another script in my script?
Message-Id: <slrn7d2pt8.gbu.clay@panix.com>
On Mon, 22 Feb 1999 02:46:47 -0500, Tad McClellan <tadmc@metronet.com> wrote:
>Randy, G.C. Lei (rlei@mail.com) wrote:
>: I did this before, I use
>: system("perl myscript.cgi");
>: I know this is a good way to do it, but I just wrote something like this and
>: it didn't work,
>: anyone has any idea?
>
>
> You have an error on line 17.
Wasn't it line 21?
--
Clay Irving <clay@panix.com>
Some books are to be tasted; others swallowed; and some to be chewed and
digested.
- Francis Bacon
------------------------------
Date: Mon, 22 Feb 1999 14:59:05 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: How to run another script in my script?
Message-Id: <x3yr9rirz07.fsf@tigre.matrox.com>
"Randy, G.C. Lei" <rlei@mail.com> writes:
> I did this before, I use system("perl myscript.cgi");
perldoc -f do
------------------------------
Date: Mon, 22 Feb 1999 14:26:02 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to run another script in my script?
Message-Id: <a0bsa7.se2.ln@magna.metronet.com>
Clay Irving (clay@panix.com) wrote:
: On Mon, 22 Feb 1999 02:46:47 -0500, Tad McClellan <tadmc@metronet.com> wrote:
: >Randy, G.C. Lei (rlei@mail.com) wrote:
: >: I did this before, I use
: >: system("perl myscript.cgi");
: >: I know this is a good way to do it, but I just wrote something like this and
: >: it didn't work,
: >: anyone has any idea?
: >
: >
: > You have an error on line 17.
: Wasn't it line 21?
How can I generate a random line number in Perl for use in Usenet
followups to articles that don't give enough information?
:-)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 22 Feb 1999 09:14:40 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: How to run another script in my script?
Message-Id: <slrn7d27u5.pu.efflandt@efflandt.xnet.com>
On Sun, 21 Feb 1999 20:12:40 -0400, Randy, G.C. Lei <rlei@mail.com> wrote:
>I did this before, I use
>system("perl myscript.cgi");
>I know this is a good way to do it, but I just wrote something like this and
>it didn't work,
>anyone has any idea?
>
>--------------------------------
>Randy, Garn-Chiun Lei
>rlei@mail.com
Could be any number of problems. First of all, if myscript.cgi is written
properly, you don't need the perl in front of it (why ask perl to run
perl?). Does myscript.cgi run in the shell or when called directly by
URL? Another possibility is that the current path is not what you think
it is. Try a full system path (although, your webserver path might
differ from your shell path).
--
David Efflandt efflandt@xnet.com
http://www.xnet.com/~efflandt/
------------------------------
Date: Tue, 23 Feb 1999 12:15:47 GMT
From: thst@my-dejanews.com
Subject: How to send an error msg on die ?
Message-Id: <7au65e$5e2$1@nnrp1.dejanews.com>
Assuming we have a perl cgi script with the following statement (ignore line
wrap):
...
$workfile = xxxx.dat";
open(WORKFILE, "$workfile") || die "Content-Type:
text/html\n\n<HEAD><TITLE>test</TITLE></HEAD><BODY>Could not open
$workfile...</BODY></HTML>";
...
If $workfile doesn't exist I want to send an information page. But the way
I've done that doesn't work. The server shows the following msg:
Internal Server Error The server encountered an internal error or
misconfiguration and was unable to complete your request. Please contact the
server administrator, webmaster@mydomain.com and inform them of the time the
error occurred, and anything you might have done that may have caused the
error.
Any other suggestions ?
Bye
Thomas
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 23 Feb 1999 19:23:28 GMT
From: droby@copyright.com
Subject: Re: How to send an error msg on die ?
Message-Id: <7auv74$rpr$1@nnrp1.dejanews.com>
In article <7aul3t$d34$1@phys-ma.sol.co.uk>,
"Colin Chaplin" <Colin@Chaplin.sol.co.uk> wrote:
> >...
> >$workfile = xxxx.dat";
> >open(WORKFILE, "$workfile") || die "Content-Type:
> > text/html\n\n<HEAD><TITLE>test</TITLE></HEAD><BODY>Could not open
> > $workfile...</BODY></HTML>";
> >...
> >
> >If $workfile doesn't exist I want to send an information page. But the way
> >I've done that doesn't work. The server shows the following msg:
>
> The Die message is, rightly, being sent to STDERR - which will be an error
> log of your web server. Look in there if you want and you will see the die
> message
>
> The reason you get the internal server is that you indicate to the web
> server that your program terminated unsucessfully. I would do something like
> this
>
> open(WORKFILE, "$workfile") ||
> {
> print "Content-Type:
> text/html\n\n<HEAD><TITLE>test</TITLE></HEAD><BODY>Something bas has
> happened</BODY></HTML>";
> exit(1)
> }
>
You should both read the section in perlfaq9 under the heading "How can I get
better error messages from a CGI program?".
The CGI.pm makes life easier in many ways, and this is one of them.
--
Don Roby
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 23 Feb 1999 16:30:25 -0000
From: "Colin Chaplin" <Colin@Chaplin.sol.co.uk>
Subject: Re: How to send an error msg on die ?
Message-Id: <7aul3t$d34$1@phys-ma.sol.co.uk>
>...
>$workfile = xxxx.dat";
>open(WORKFILE, "$workfile") || die "Content-Type:
> text/html\n\n<HEAD><TITLE>test</TITLE></HEAD><BODY>Could not open
> $workfile...</BODY></HTML>";
>...
>
>If $workfile doesn't exist I want to send an information page. But the way
>I've done that doesn't work. The server shows the following msg:
The Die message is, rightly, being sent to STDERR - which will be an error
log of your web server. Look in there if you want and you will see the die
message
The reason you get the internal server is that you indicate to the web
server that your program terminated unsucessfully. I would do something like
this
open(WORKFILE, "$workfile") ||
{
print "Content-Type:
text/html\n\n<HEAD><TITLE>test</TITLE></HEAD><BODY>Something bas has
happened</BODY></HTML>";
exit(1)
}
Colin
------------------------------
Date: Tue, 23 Feb 1999 12:36:36 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: How to send an error msg on die ?
Message-Id: <7auoj2$uuv$1@camel0.mindspring.com>
thst@my-dejanews.com wrote in message <7au65e$5e2$1@nnrp1.dejanews.com>...
:Assuming we have a perl cgi script with the following statement (ignore
line
:wrap):
:$workfile = xxxx.dat";
:open(WORKFILE, "$workfile") || die "Content-Type:
: text/html\n\n<HEAD><TITLE>test</TITLE></HEAD><BODY>Could not open
: $workfile...</BODY></HTML>";
:...
:If $workfile doesn't exist I want to send an information page. But the way
:I've done that doesn't work. The server shows the following msg:
:Internal Server Error The server encountered an internal error or
:misconfiguration and was unable to complete your request. Please contact
the
:server administrator, webmaster@mydomain.com and inform them of the time
the
:error occurred, and anything you might have done that may have caused the
:error.
:Any other suggestions ?
You might want to use CGI.pm if you are not already. Then simply include the
line:
use CGI::Carp qw(fatalsToBrowser);
at the top of the script and the errors will be sent to the browser.
HTH
AmD
--
$email{'Allan M. Due'} = 'Allan@Due.net';
--random quote --
Imagination is more important than knowledge.
Albert Einstein
------------------------------
Date: Mon, 22 Feb 1999 11:02:44 +0000
From: Herger Peter <peter.herger@swisslife.ch>
Subject: How to send SMS messages
Message-Id: <36D13954.480F7CF8@swisslife.ch>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi all
<br>Is it possible to send SMS Messages to a mobile phone with a perl script?
And where can I find a description how to do this???
<p>Thank for your help
<p>Peter Herger</html>
------------------------------
Date: 22 Feb 1999 23:20:32 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: How to send SMS messages
Message-Id: <7asoo0$3u7$1@gellyfish.btinternet.com>
On Mon, 22 Feb 1999 11:02:44 +0000 Herger Peter wrote:
> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> <html>
Sort your newsreader out - this isnt even proper MIME crap.
> Hi all
> Is it possible to send SMS Messages to a mobile phone with a perl script?
> And where can I find a description how to do this???
A combination of Win32::Serial (if I can assume that you want to do this
from the machine you posted from) and the documentation for SMS will
get you some idea of what you will need to do.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Wed, 24 Feb 1999 22:57:02 GMT
From: yxw1@yahoo.com
Subject: How to Split This String?
Message-Id: <7b203q$f77$1@nnrp1.dejanews.com>
Hi,
I have a string here: $a= '"a","b",,"c,d","e"'; and I like to split this
string via the "," outside the double quote ("). In other words, the result
should be $buffer[0]= "a", $buffer[1]= "b", $buffer[2]= "", $buffer[3]= "c,d"
and $buffer[4]= "e".
Please cc your answer to my email too. Thanks a lot.
Sunny
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 24 Feb 1999 18:34:53 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: How to Split This String?
Message-Id: <slrn7d934t.osd.clay@panix.com>
On Wed, 24 Feb 1999 22:57:02 GMT, yxw1@yahoo.com <yxw1@yahoo.com> wrote:
>I have a string here: $a= '"a","b",,"c,d","e"'; and I like to split this
>string via the "," outside the double quote ("). In other words, the result
>should be $buffer[0]= "a", $buffer[1]= "b", $buffer[2]= "", $buffer[3]= "c,d"
>and $buffer[4]= "e".
>
>Please cc your answer to my email too. Thanks a lot.
>
>Sunny
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
You posted you message from Deja News, but you forgot to search for an
answer before you posted. Search. Its there...
--
Clay Irving <clay@panix.com>
Advertising reaches out to touch the fantasy part of people's lives. and
you know, most people's fantasies are pretty sad.
- Frederik Pohl
------------------------------
Date: 25 Feb 1999 03:41:56 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: How to Split This String?
Message-Id: <7b2gq4$p3m$1@client2.news.psi.net>
yxw1@yahoo.com (yxw1@yahoo.com) wrote on MMIII September MCMXCIII in
<URL:news:7b203q$f77$1@nnrp1.dejanews.com>:
__
__ I have a string here: $a= '"a","b",,"c,d","e"'; and I like to split this
__ string via the "," outside the double quote ("). In other words, the result
__ should be $buffer[0]= "a", $buffer[1]= "b", $buffer[2]= "", $buffer[3]= "c,d"
__ and $buffer[4]= "e".
FAQ
__ Please cc your answer to my email too. Thanks a lot.
No.
Abigail
--
perl -e 'for (s??4a75737420616e6f74686572205065726c204861636b65720as?;??;??)
{s?(..)s\??qq \?print chr 0x$1 and q ss\??excess}'
------------------------------
Date: Wed, 24 Feb 1999 18:33:08 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to Split This String?
Message-Id: <k722b7.nmc.ln@magna.metronet.com>
yxw1@yahoo.com wrote:
: I like to split this
: string via the "," outside the double quote
Perl FAQ, part 4:
"How can I split a [character] delimited string except
when inside [character]? (Comma-separated files)"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 23 Feb 1999 03:53:27 GMT
From: boris.tang@connection.com.hk
Subject: Html e-mail in Perl
Message-Id: <7at8nj$ct6$1@nnrp1.dejanews.com>
Does any body know how to send html e-mail in perl ?
I know how to send e-mail in perl, but I don't know what should I add in the
perl script so that I can send html e-mail, please help.
Thanks a lot !
Boris
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 23 Feb 1999 14:44:30 -0500
From: "Ken Hirsch" <kenhirsch@myself.com>
Subject: Re: Html e-mail in Perl
Message-Id: <7av0eo$3ec$1@holly.prod.itd.earthlink.net>
Abigail wrote
>boris.tang@connection.com.hk (boris.tang@connection.com.hk) wrote on MMII
>September MCMXCIII in <URL:news:7at8nj$ct6$1@nnrp1.dejanews.com>:
>|| Does any body know how to send html e-mail in perl ?
>|| I know how to send e-mail in perl, but I don't know what should I add in
the
>|| perl script so that I can send html e-mail, please help.
>
>
>You don't need to do anything special. Mail couldn't care less whether
>you markup your text with HTML or not.
Yes, but some (or all) HTML mail readers won't display it as HTML unless it
has a mime content type of "text/html"
It is also good to send a plain text version as an alternative.
To see the exact format, send yourself an HTML message and look at the
source. In Outlook Express, choose File,Properties,Details, Message Source.
Then you can see how the multipart/alternative headers and delimiters are
done.
There are probably Perl modules to help with this, but I haven't used them.
The keywords are "MIME" and "SMTP".
Ken Hirsch
Carrboro, NC
------------------------------
Date: 23 Feb 1999 08:42:09 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Html e-mail in Perl
Message-Id: <slrn7d5c1g.n9e.clay@panix.com>
On Tue, 23 Feb 1999 03:53:27 GMT, boris.tang@connection.com.hk
<boris.tang@connection.com.hk> wrote:
>Does any body know how to send html e-mail in perl ?
>I know how to send e-mail in perl, but I don't know what should I add in the
>perl script so that I can send html e-mail, please help.
You need to add HTML formatting.
--
Clay Irving <clay@panix.com>
Jesus is coming, look busy
------------------------------
Date: 23 Feb 1999 16:36:01 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Html e-mail in Perl
Message-Id: <7auldh$20b$3@client2.news.psi.net>
boris.tang@connection.com.hk (boris.tang@connection.com.hk) wrote on MMII
September MCMXCIII in <URL:news:7at8nj$ct6$1@nnrp1.dejanews.com>:
|| Does any body know how to send html e-mail in perl ?
|| I know how to send e-mail in perl, but I don't know what should I add in the
|| perl script so that I can send html e-mail, please help.
You don't need to do anything special. Mail couldn't care less whether
you markup your text with HTML or not.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
------------------------------
Date: 24 Feb 1999 00:35:28 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Html e-mail in Perl
Message-Id: <7avhgg$ao5$2@client2.news.psi.net>
Ken Hirsch (kenhirsch@myself.com) wrote on MMII September MCMXCIII in
<URL:news:7av0eo$3ec$1@holly.prod.itd.earthlink.net>:
--
-- Abigail wrote
-- >boris.tang@connection.com.hk (boris.tang@connection.com.hk) wrote on MMII
-- >September MCMXCIII in <URL:news:7at8nj$ct6$1@nnrp1.dejanews.com>:
-- >|| Does any body know how to send html e-mail in perl ?
-- >|| I know how to send e-mail in perl, but I don't know what should I add in
-- the
-- >|| perl script so that I can send html e-mail, please help.
-- >
-- >
-- >You don't need to do anything special. Mail couldn't care less whether
-- >you markup your text with HTML or not.
--
--
-- Yes, but some (or all) HTML mail readers won't display it as HTML unless it
-- has a mime content type of "text/html"
But that's not the question.
-- It is also good to send a plain text version as an alternative.
That's not the question, and beyond the scope of this group.
Maybe he's just sending mail to himself.
-- To see the exact format, send yourself an HTML message and look at the
-- source. In Outlook Express, choose File,Properties,Details, Message Source.
Well..... if he know how to send himself email in HTML format, he wouldn't
need to ask, now would he?
-- Then you can see how the multipart/alternative headers and delimiters are
-- done.
But that's not HTML! That's MIME! That's a different issue.
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
------------------------------
Date: Tue, 23 Feb 1999 21:47:24 -0500
From: "Ken Hirsch" <kenhirsch@myself.com>
Subject: Re: Html e-mail in Perl
Message-Id: <7avqm6$q9o$1@fir.prod.itd.earthlink.net>
Abigail wrote
>Ken Hirsch (kenhirsch@myself.com) wrote on MMII September MCMXCIII in
><URL:news:7av0eo$3ec$1@holly.prod.itd.earthlink.net>:
>-- It is also good to send a plain text version as an alternative.
>
>That's not the question, and beyond the scope of this group.
>Maybe he's just sending mail to himself.
I wasn't aware that it was a requirement on this newsgroup to send the least
information possible.
>
>-- To see the exact format, send yourself an HTML message and look at the
>-- source. In Outlook Express, choose File,Properties,Details, Message
Source.
>
>Well..... if he know how to send himself email in HTML format, he wouldn't
>need to ask, now would he?
There's a difference between sending mail from Netscape Messenger or Outlook
and sending it from a program.
>
>-- Then you can see how the multipart/alternative headers and delimiters
are
>-- done.
>
>But that's not HTML! That's MIME! That's a different issue.
This reminds me of a joke:
Two physicists were lost in the sky, riding in a hot-air balloon. They
drifted over a valley and saw someone below. "Let's ask him where we are,"
the first physicist said. So he shouted down: "WHERE AAAARE WE?" There was a
long pause, after which the man shouted back: "YOUUU'RE IN A BALLOOON."
"Obviously a mathematician," the second physicist said. "Why do you say
that?" "Well, he took a long time to answer; his answer was completely
correct; and, it was utterly useless."
Ken Hirsch
Carrboro, NC
------------------------------
Date: Wed, 24 Feb 1999 00:30:21 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Html e-mail in Perl
Message-Id: <1dnpfnh.nineec1rj6djqN@bay1-193.quincy.ziplink.net>
Ken Hirsch <kenhirsch@myself.com> wrote:
> This reminds me of a joke:
>
> Two physicists were lost in the sky, riding in a hot-air balloon. They
> drifted over a valley and saw someone below. "Let's ask him where we are,"
> the first physicist said. So he shouted down: "WHERE AAAARE WE?" There was a
> long pause, after which the man shouted back: "YOUUU'RE IN A BALLOOON."
> "Obviously a mathematician," the second physicist said. "Why do you say
> that?" "Well, he took a long time to answer; his answer was completely
> correct; and, it was utterly useless."
This reminds me a joke:
(I usually hear your version where the guy on the ground is in Tech
Support. :-)
A man riding in a hot-air balloon had gotten lost. He saw someone on
the ground and shouted down, "Where am I?" The man on the ground
shouted back, "You're in a hot-air balloon."
The man in the balloon shouted, "You must be in Tech Support." The man
on the ground shouted, asking, "How do you know?" And our man in the
balloon responded, "Your answer was completely accurate, but entirely
useless."
The man on the ground then shouted, "You must be a businessman." The
balloon man shouted questioningly, "How can you tell?"
And the man on the ground yelled, "Well, you're in exactly the same
situation you were a minute ago, but now it's my fault."
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Thu, 25 Feb 1999 00:53:50 GMT
From: dragnovich@my-dejanews.com
Subject: Re: Html e-mail in Perl
Message-Id: <7b26ur$kqu$1@nnrp1.dejanews.com>
Is soo easy! when your SMTP subrutine is creating the Header of the file
you have to add the follow line ...
Content-Type: text/html; charset=us-ascii\n
then when the email client reads your email, you will get an Html email!
See you!
------------------------
Juan Carlos Lopez
QDesigns President & CEO
http://www.qdesigns.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 4979
**************************************