[10488] in Perl-Users-Digest
Perl-Users Digest, Issue: 4080 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 27 09:05:43 1998
Date: Tue, 27 Oct 98 06:00:20 -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 Tue, 27 Oct 1998 Volume: 8 Number: 4080
Today's topics:
Re: # url_get.pl 1.15 27 Sep 1995 <michiel.verhoef@wkap.nl>
About CGI database <msl1997@yahoo.com>
About CGI database <msl1997@yahoo.com>
Re: About CGI database <Tony.Curtis+usenet@vcpc.univie.ac.at>
CGI database <msl1997@yahoo.com>
CGI database? <msl1997@yahoo.com>
Date 2 Num (Craig Pickles)
Dynamic Function Calls???? mordred00@my-dejanews.com
error handling <rolf.rettinger@desy.de>
Formmail & Windows 95 help <rose@post.queensu.ca>
Re: Not to start a language war but.. <Klaus.Schilling@home.ivm.de>
Re: Not to start a language war but.. <Klaus.Schilling@home.ivm.de>
Re: Not to start a language war but.. (Ian Collier)
Re: Not to start a language war but.. <perlguy@technologist.com>
Re: Opendir and Readdir not working as expected (I.J. Garlick)
Re: Opendir and Readdir not working as expected <jdf@pobox.com>
Passing args from one perl script to another using 'do' <stackhou@execpc.com>
Process ID number under Win32 <dand@steelerubber.com>
Re: Repost from Data toiday@my-dejanews.com
Re: script editing a text file. (Tad McClellan)
Re: script editing a text file. dave@mag-sol.com
Re: script editing a text file. (Joergen W. Lang)
Re: Sending mail using perl (I.J. Garlick)
sockets (Henri Periat)
Re: update html files online using online form? (Tad McClellan)
windows nt user32.dll initialization and perl <lee@juno.ltd.uk>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 27 Oct 1998 12:53:43 +0100
From: Michiel Verhoef <michiel.verhoef@wkap.nl>
Subject: Re: # url_get.pl 1.15 27 Sep 1995
Message-Id: <3635B447.A17B53A1@wkap.nl>
I am not sure what the page should show but I get a couple of tables with
some
weird looking headers. The tables contain links to pages which are not
found and
or not available on the server.
Weird..
Michiel
Pete Lucuk wrote:
> While using this version of url_get.pl (1.15 27 Sep 1995) and trying to
> GET
> this page: http://www.snweb.com/gb/gnd/gnd.htm I get the following:
>
> ERROR retrieving document (5) - 404 - Not found. File does not exist or
> is
> read protected
>
> I think the problem is that the their server is using HTTP 1.1 and
> url_get.pl has a problem with it. Am I right?, am I wrong? either way
> what is the best way to resolve this problem? Is there a version of
> url_get.pl out there that will handle this? If so where??
--
"Been there, Done that, Got the T-Shirt"
Michiel Verhoef
phone: (078) 6392587
e-mail: Michiel.Verhoef@wkap.nl
------------------------------
Date: Tue, 27 Oct 1998 21:18:25 +0800
From: William <msl1997@yahoo.com>
Subject: About CGI database
Message-Id: <3635C821.2BAD@yahoo.com>
Dear All
How can I write a CGI database? Which language can I use?(Perl, C++,
Visual Basic,etc.)
Best Regards
William
------------------------------
Date: Tue, 27 Oct 1998 21:18:50 +0800
From: William <msl1997@yahoo.com>
Subject: About CGI database
Message-Id: <3635C83A.700@yahoo.com>
Dear All
How can I write a CGI database? Which language can I use?(Perl, C++,
Visual Basic,etc.)
Best Regards
William
------------------------------
Date: 27 Oct 1998 14:40:11 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: About CGI database
Message-Id: <837lxmm8ck.fsf@vcpc.univie.ac.at>
Re: About CGI database, William <msl1997@yahoo.com> said:
William> Dear All How can I write a CGI database? Which
William> language can I use?(Perl, C++, Visual Basic,etc.)
(There's no such thing as a "CGI database".)
If you want to know about accessing databases from perl (why
else would you be posting to a perl newsgroup?) then see the
DBI and DBD modules. For using perl with CGI, see the
CGI.pm module.
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Tue, 27 Oct 1998 21:27:50 +0800
From: William <msl1997@yahoo.com>
Subject: CGI database
Message-Id: <3635CA56.750E@yahoo.com>
Dear All
How can I write a CGI database? Which language can I use?(Perl, C++,
Visual Basic,etc.)
Best Regards
William
------------------------------
Date: Tue, 27 Oct 1998 21:27:35 +0800
From: William <msl1997@yahoo.com>
Subject: CGI database?
Message-Id: <3635CA47.2D71@yahoo.com>
Dear All
How can I write a CGI database? Which language can I use?(Perl, C++,
Visual Basic,etc.)
Best Regards
William
------------------------------
Date: Tue, 27 Oct 1998 12:46:42 GMT
From: pickles_c@hotmail.com (Craig Pickles)
Subject: Date 2 Num
Message-Id: <3637b88c.90983375@news.demon.co.uk>
Does anybody know of a place which has an archive of Perl
SUBROUTINES...
I am looking for a subroutine that would convert a date (in a specific
format if needed) to a number and back again......
I know the Date:Calc module would do this, but unofrtunately, I am
running my site from a cheap server that doesnt allow me access to C
for compiling......
So all I want to know is this... is there a place on the web where I
can find such things as subroutines, or do I have to create them
myself...
Thanking you in advance
Craig
------------------------------
Date: Tue, 27 Oct 1998 12:58:28 GMT
From: mordred00@my-dejanews.com
Subject: Dynamic Function Calls????
Message-Id: <714g1k$8j4$1@nnrp1.dejanews.com>
Hello there,
I recently decided to program a MUD engine in Perl, and as part of the design
stage I realised that to make it nice and flexible, it would have to have it's
own programming language for the locations.
e.g.
if user is a ghost then let him past, else kill him.
Writing a programming language is a little beyond me right now, and then
something occured to me. Why can't I use Perl? If each room had an associated
Perl file containing functions, conditional statements etc. etc. and these
functions could be run dynamically (e.g. if the room contains a North()
function then run it etc. etc.) then you could accomplish severe flexibility.
But is there a way to run a Perl function via a string? So, you might load the
string with the name of a room function (e.g. North32) and call it like that.
But the next time, you might have loaded the string with the name North35 and
want to run that function instead.
I'm not overly familiar with Perl modules etc. at the moment, but I just want
to know what I should be looking at to achieve this (and whether it's
plausible).
If you wouldn't mind responding via e-mail also (if possible) I'd really
appreciate it. I'm stuck on DejaNews and there's a good possibility I may
miss any responses. It's bad netiquette, I know, which is why I'll understand
if you don't want to. :)
Thanks alot,
Karl
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 27 Oct 1998 13:40:47 +0100
From: "Rolf Rettinger" <rolf.rettinger@desy.de>
Subject: error handling
Message-Id: <714f1i$brb$1@claire.desy.de>
Is it possible to use the die() or warn() methods for error handling by
system routines like
system("scopy c:\\temp\\aaa c:\\temp\\aaa /a /o /s") ||
die "scopy was not succesful\n";
or by
system("net user $UserName /add /domain\n") ||
warn "$Username could not be created\n";
or is there a better utility to check if the command was succesful?
Thanks Rolf
------------------------------
Date: Tue, 27 Oct 1998 00:21:30 -0500
From: Rose Chan <rose@post.queensu.ca>
Subject: Formmail & Windows 95 help
Message-Id: <3635585A.4CCE@post.queensu.ca>
I'm trying to get Matt's Formmail program working on a Windows 95 system
using MS Personal Web Server. I have installed Perl for Win32 from
www.ActiveState.com. This seems to be installed correctly as I can run
the test script from the installation notes as well as other simple
scripts. Next I installed Blat 1.7i. It too works as I can send mail
via the Dos command line. I realize the documentation states that
formmail has been tested with Blat 1.5 but I can't find a copy of it.
Lastly, I installed Formmail 1.6 for Windows 32 the version located at
www.ahamade.com/yousef/techy/perl/formmail.htm. When I run this script
either from a web page or from a DOS command line, I get the following
error:
Can't locate Win32/Process.pm in @INC at
C:\Inetpub\wwwroot\cgi-bin\formmail.pl line 444
BEGIN failed -- compliation aborted at
c:\Inetpub\wwwroot\cgi-bin\formmail.pl line 444.
Here it what it says on line 443 - 47.
#'use' the process module.
use Win32::Process;
#theWin32:: module. Includes the Win32 error checking etc.
# see Win32:: section for included functions.
use Win32;
On my system process.pm is located in c:\perl5\lib\win32. I even made
sure that there was a path to it though I don't know whether I had too.
Also for your info, I've included my formmail settings.
$mailprog = 'c:/inetpub/wwwroot/cgi-bin/blat.exe';
$tempdir = 'c:/Temp';
$uselog = 1; # 1 = Yes; 0 = No
$logfile = 'c:/Temp/formmail.log';
$IIS_MODE = 1;
@referers = ('rose.ccs.queensu.ca','130.15.48.246');
I also find it interesting that I don't get a formmail.log even though
I indicated that I want one.
Any help would be appreciated.
Rose Chan, rose@post.queensu.ca
------------------------------
Date: 27 Oct 1998 11:10:20 +0100
From: Klaus Schilling <Klaus.Schilling@home.ivm.de>
Subject: Re: Not to start a language war but..
Message-Id: <87vhl671tf.fsf@ivm.de>
sholden@pgrad.cs.usyd.edu.au (Sam Holden) writes:
> On Mon, 26 Oct 1998 21:11:34 GMT, David Combs <dkcombs@netcom.com> wrote:
> >(1) What about garbage collection?
> >
> >The last time I looked at Python, it worked via ONLY
> >ref-counts; ie, could not gc circular lists, anything
> >with backpointers, etc.
> >
> >Seemed to me like a real loss, compared to perl's.
>
> But perl also uses a reference count and thus doesn't garbage collect
> self-referential constructs....
Would python or perl change severely if one replaced ref-counting with a real
gc like Boehm's?
Klaus Schilling
------------------------------
Date: 27 Oct 1998 11:14:42 +0100
From: Klaus Schilling <Klaus.Schilling@home.ivm.de>
Subject: Re: Not to start a language war but..
Message-Id: <87soga71m5.fsf@ivm.de>
abigail@fnx.com (Abigail) writes:
> Hmm, sure. But in Perl I can write "The answer is $a", just like in
> the shell. And if I have a variable $goobelygook, and I upgrade Perl
> with the new version of Perl having a function called 'goobelygook'
> (or I use a Module that exports a function 'goobelygook') I won't have
> any name clashes.
>
> Using '$', '@', '%', '*' or '&' as prefixes for variables doesn't make
> Perl a better language than Python, nor does it make Perl less than
> Python. Perl just made a different choice; if you don't like, don't
> use it.
>
> ++ Do you understand now why some of us really dislike this aspect of
> ++ Perl, or am I writing on at length to no avail?
>
> Then don't use Perl.
>
People might be forced to use perl for compatibility reasons, not because they
like it.
Klaus Schilling
------------------------------
Date: 27 Oct 1998 12:16:03 GMT
From: imc@comlab.ox.ac.uk (Ian Collier)
Subject: Re: Not to start a language war but..
Message-Id: <16405-debarring.imc@comlab.ox.ac.uk>
In article <3634F7E6.84E99667@min.net>, John Porter <jdporter@min.net> wrote:
>> Perl definitely beats Rexx almost everywhere else though. (Maybe I
>> should crosspost this to comp.lang.rexx and see what they think?)
>Hmm, is there anyone reading that newsgroup? ;-)
Of course. Have you checked it recently?
Here's what we think about it:
RexxFAQ question 1. Is REXX better than ?
Short answer: Yes. No. Maybe. Does it matter?
Long answer: This question wastes a lot of bandwidth in comp.lang.rexx and
other newsgroups. Every language has its good points and its bad points.
Some people love REXX, some people hate it. Use a language that suits your
needs.
--
---- Ian Collier : imc@comlab.ox.ac.uk : WWW page below
------ http://www.comlab.ox.ac.uk/oucl/users/ian.collier/imc.html
------------------------------
Date: Tue, 27 Oct 1998 12:39:28 GMT
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: Not to start a language war but..
Message-Id: <3635BF00.AE055A49@technologist.com>
Klaus Schilling wrote:
..snip..
> People might be forced to use perl for compatibility reasons, not because they
> like it.
>
> Klaus Schilling
Speak for youself Klaus.
I happen to be doing some incredible things with Perl AND I like/LOVE
using Perl to do it with!
I have written a complete document management system with Perl, and now
I am in the process of making it even better.
I have not found a SINGLE real world computing problem that I have not
been able to find a way to do it with Perl. I write for the "web world"
because that is where my users reside...
- Create ready-made RTF docs, sure.
- Create a web-based interface with a form filling program, no problem.
- Modify the rights on an entire NT directory structure based on the
rights in a simple configuration file, OK.
- Create a web-based PowerPoint file converter that allows people
without the latest version to update their files to the latest version,
give me a minute... Done.
Perl allows me to be creative and doesn't impose limits on what I want
to do.
You don't need to convince me of your Python views, obviously Python
programmers love their language as much as Perl programmers. I am
perfectly happy programming Perl and making my living from it. I have
no reason to switch.
I am sure that Python is a very good language. However, I will not
stoop to your level and keep the "my language is better than yours/my
mom can beat up your mom" argument. [ Now Java, that is another matter
;-) ]
If you want to program in Python great! If you want to program in
AppleSoft BASIC cool! It doesn't matter. As long as the people writing
the programs are getting the work done and (hopfully) having a good time
doing it.
Brent
--
Java? I've heard of it, it is what I drink when I am hacking Perl. -me
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$ Brent Michalski $
$ -- Perl Evangelist -- $
$ E-Mail: perlguy@technologist.com $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
------------------------------
Date: Tue, 27 Oct 1998 09:19:34 GMT
From: ijg@csc.liv.ac.uk (I.J. Garlick)
Subject: Re: Opendir and Readdir not working as expected
Message-Id: <F1HB8M.6Jn@csc.liv.ac.uk>
In article <712o3e$ac2$1@nonews.col.hp.com>,
smithw@nospam.spam.com (Walter Smith) writes:
> Folks,
>
> (this is on a perl5 system)
>
> The following script I expected to list all the files
> in the given directory, but all it returns is ".".
So why did you invent your own code and not copy it exactly from the Camel?
(page 202) It's almost a perfect copy anyway, and it works, so why change it?
>
> #!/usr/local/bin/perl
Not a good start. What happened to the '-w' ? remember -w is your friend.
#!/usr/local/bin/perl -w
It wont help you here, but you wont regret it in the future.
> chdir "/etc/lvmconf/";
> opendir(DIR,".") || die "cant open /etc/lvmconf";
Why have you got parenthesese (sp?) around the args for opendir? and why are
you using '||' and not 'or'
opendir DIR,"." or die "cant open /etc/lvmconf";
Watch that presedence or it will bite you one day.
> #opendir(DIR,"/etc/lvmconf/") || die "cant open /etc/lvmconf";
> print `pwd`;
> @files = readdir(DIR) || die "cant readdir";
Oh look, I spoke to soon, it's bitten you already.
More unecessary use of parentheses and that '||' is why the script don't work.
try any of the following:-
@files = readdir DIR;
@files = readdir DIR or die "cant readdir";
(@files = readdir DIR) || die "cant readdir";
TBH I can't think of a reason why you want the second check. If you can't
read the dir because of permission probs then you deffinately wont be able to
open it in the first place. I await correction on this point by those more
knowledgeable, but I don't think I am wrong here.
Of course if the open is somewhat removed from the read then it is conceivable
that the permissions might change, come on it's possible, don't know why you
would want to do this but it is possible.
> closedir(DIR);
> print @files;
>
>
>
> I'm stumped....it seems so simple and obvious, but it
> doesn't work. Can someone smack me over the skull with
> a 2x4 and tell me what I'm missing? I've tried "opendir"
> on the directory directly (the commented out 3rd line) or
> in this current chdir/openddir/readdir sequence, and
> both did the same.
>
> Thanks!
>
> Walter
--
--
Ian J. Garlick
<ijg@csc.liv.ac.uk>
Democracy is a government where you can say what you think even if you
don't think.
------------------------------
Date: 27 Oct 1998 13:10:26 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: ijg@csc.liv.ac.uk (I.J. Garlick)
Subject: Re: Opendir and Readdir not working as expected
Message-Id: <m3n26ikxxp.fsf@joshua.panix.com>
ijg@csc.liv.ac.uk (I.J. Garlick) writes:
> > opendir(DIR,".") || die "cant open /etc/lvmconf";
>
> Why have you got parenthesese (sp?) around the args for opendir? and
> why are you using '||' and not 'or'
That's a matter of taste, and not a bug. You answer your own
question: the parentheses give opendir() a higher precedence than ||,
as documented in perlop.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Tue, 27 Oct 1998 07:42:07 -0600
From: Mark Stackhouse <stackhou@execpc.com>
Subject: Passing args from one perl script to another using 'do'
Message-Id: <714ik3$bug@newsops.execpc.com>
I can successfully call another perl script using 'do' but can't figure
out how to pass args to it. I've read the perldocs on 'sub', '$_',
'@ARGS', 'do', and searched Dejanews, but can't seem to locate what I'm
looking for. I've also read the threads on "What's the "best" way to
call one Perl script from another?". Doug's thread seems to be what I
need but I can't find any docs on what he suggests:(
if ( ! caller )
{
parse args
call function
}
Could someone please point me to docs I should be reading?
Thanks,
--
Mark Stackhouse
***********************************************************************
homepage: http://www.execpc.com/~stackhou
"The best things in life aren't things."
--Art Buchwald
***********************************************************************
------------------------------
Date: Tue, 27 Oct 1998 08:53:57 -0500
From: "David Anderson" <dand@steelerubber.com>
Subject: Process ID number under Win32
Message-Id: <KfkZ1.432$5w.5216499@ralph.vnet.net>
Is there a neat trick to get the process ID number ($$) to be a number
similar to unixes that I'm familiar with (1 to 25000 or so) instead of the
negative 6 digit number.
$fpid=$$
$fpid is typically -456780 under ActivePerl (current)
$fpid would be 3456 under FreeBSD or SCO Unix
Thanks from a new (and learning) perl fan....
------------------------------
Date: Tue, 27 Oct 1998 12:57:39 GMT
From: toiday@my-dejanews.com
Subject: Re: Repost from Data
Message-Id: <714g04$8j1$1@nnrp1.dejanews.com>
In article <slrn72vns2.oi4.sholden@pgrad.cs.usyd.edu.au>,
sholden@cs.usyd.edu.au wrote:
> On Thu, 22 Oct 1998 18:09:22 GMT, toiday@my-dejanews.com
> <toiday@my-dejanews.com> wrote:
> >I'm writing a cgi program. Because program generate a webpage that need to
> >update the information, I include the following:
> >
> ><META HTTP-EQUIV="REFRESH" CONTENT="120">
> >
> >to refresh every 2 minutes. This webpage would also do "POST". The problem
> >is if someone use Microsoft IE (version 4) to submit the data, after two
> >minutes, when it suppose to REFRESH, it would ask "Repost from Data?".
> >However, it work fine for Netscape. Can someone tell me what is going on
> >with IE? How can I fix that problem?
>
> I think you just use...
> <META HTTP-EQUIV="REFRESH" CONTENT="120" MISC="POST DAMN YOU!!!!!!">
>
> Then again I write perl not HTML... maybe you should try a more appropriate
> news group...
>
> --
> Sam
>
> PC's are backwards ... throw them out! Linux is ok though.
> --Rob Pike (on the subject of CR/LF etc)
>
FYI - Most people use Perl to write CGI for living, NOT for fun.
Do you parents or college teach you to be an asshole? If you don't know the
answer then shutup. May be one day when you grow up, get out of college and
get a real job, you may understand. Meanwhile, computer is not a toy.
Newsgroup is not the place for you to harass people. Don't waste you
parent's hard working money.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 27 Oct 1998 08:01:33 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: script editing a text file.
Message-Id: <tnj417.5nc.ln@flash.net>
Matevz Sernc (sernc@mailserv.rz.fh-muenchen.de) wrote:
: Can anyone help me
The documentation that got installed somewhere on your hard disk
when the perl binary was installed can help you. Now, and many
times again in the future.
Find out where it is on your system, and harness the Power.
: in making a cgi script which can open a text file and
: deletes the last line + inserts what a user has entered in a form.
Perl FAQ, part 5:
"How do I change one line in a file/
delete a line in a file/
insert a line in the middle of a file/
append to the beginning of a file?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 27 Oct 1998 13:26:10 GMT
From: dave@mag-sol.com
Subject: Re: script editing a text file.
Message-Id: <714hli$aip$1@nnrp1.dejanews.com>
In article <7140ba$q9i$1@sparcserver.lrz-muenchen.de>,
"Matevz Sernc" <sernc@mailserv.rz.fh-muenchen.de> wrote:
> Hi all
>
> Can anyone help me in making a cgi script which can open a text file and
> deletes the last line + inserts what a user has entered in a form.
Why don't you post what you already have and tell us what problems you're
having and we can try to help you solve them.
...I'm assuming that you've read the docs and the faq. Haven't you?
hth,
Dave...
--
dave@mag-sol.com
London Perl M[ou]ngers: <http://london.pm.org/>
[Note Changed URL]
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 27 Oct 1998 14:06:48 +0100
From: jwl@_munged_worldmusic.de (Joergen W. Lang)
Subject: Re: script editing a text file.
Message-Id: <1dhk9cu.rumdwh1b1ie2bN@host006-210.seicom.net>
Matevz Sernc <sernc@mailserv.rz.fh-muenchen.de> wrote:
> Hi all
>
> Can anyone help me in making a cgi script which can open a text file and
> deletes the last line + inserts what a user has entered in a form.
>
> Thanks for helping
> Mat.
You can help yourself by looking into the FAQ (perlfaq5) and search for
this:
How do I change one line in a file/delete a line in a file/insert a line
in the middle of a file/append to the beginning of a file?
Additionally check out the module CGI.pm (part of the perl standard
distribution) which handles CGI-action. The documentation is included in
the module.
hth, HANW,
Joergen
--
To reply by email please remove _munged_ from address Thanks !
-------------------------------------------------------------------
"Everything is possible - even sometimes the impossible"
HOELDERLIN EXPRESS - "Touch the void"
------------------------------
Date: Tue, 27 Oct 1998 10:03:12 GMT
From: ijg@csc.liv.ac.uk (I.J. Garlick)
Subject: Re: Sending mail using perl
Message-Id: <F1HD9C.8FJ@csc.liv.ac.uk>
In article <8CFE.82FF2FBE55luutrangeocitiescom@news.mindspring.com>,
"Luu Tran" <luutran@geocities_.com> writes:
> "Dan Tropea" dtropea@cabletron.com wrote in <3634C55A.1AC6@cabletron.com>:
>
> You can use sendmail, but it's probably safer (and more portable) to
Tell me why is it safer to use SMPT over sendmail when sendmail is available?
I have always been lead to believe the opposite.
>
> use Net::SMTP;
>
> Look in the cpan archive if you don't have this package.
>
--
--
Ian J. Garlick
<ijg@csc.liv.ac.uk>
<postmaster@merseymail.com>
Democracy is a government where you can say what you think even if you
don't think.
------------------------------
Date: 27 Oct 1998 09:41:40 GMT
From: periat@ens.ascom.ch (Henri Periat)
Subject: sockets
Message-Id: <7144gk$6dl$1@ascomax.hasler.ascom.ch>
Hi everybody
I would like to create two Perl programs which communicate bidirectional
with each other. A says something to B and B responds.
A:
my $TxSocket = new IO::Socket::INET (
'PeerHost' => "$RemoteHost",
'PeerPort' => 1200,
'Proto' => 'tcp',
);
die "ERROR: couldn't create socket [$!]\n" unless ($TxSocket);
$RxSocket = new IO::Socket::INET (
'LocalHost' => "$LocalHost",
'LocalPort' => 1201,
'Listen' => 5,
'Proto' => 'tcp',
'Reuse' => 1,
);
die "ERROR: couldn't connect [$!]\n" unless ($RxSocket);
print $TxSocket "start server\n";
.
.
.
B:
my $RxSocket = new IO::Socket::INET (
'LocalHost' => "$LocalHost",
'LocalPort' => 1200,
'Listen' => 5,
'Proto' => 'tcp',
'Reuse' => 1,
);
die "ERROR: couldn't connect [$!]\n" unless ($RxSocket);
while ($ServerStatus ne 'up') {
$SocketHD = $RxSocket->accept();
$PerlCommand = <$SocketHD>;
print qq($PerlCommand\n);
if ($PerlCommand =~ /^start server/) {
$TxSocket = new IO::Socket::INET (
'PeerHost' => "$RemoteHost",
'PeerPort' => 1201,
'Proto' => 'tcp',
);
die "ERROR: start couldn't create socket [$!]\n" unless ($TxSocket);
$ServerStatus = 'up';
print "Server up\n";
print $TxSocket "Server up";
}
}
.
.
.
Now i get allways [Connection refused] when B tries to create the transmit
socket.
What have i done wrong?
Thanks a lot
Henri
------------------------------
Date: Mon, 26 Oct 1998 23:20:17 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: update html files online using online form?
Message-Id: <h6l317.sta.ln@flash.net>
d3_k (d3_k@videotron.ca) wrote:
: Hi, I need to be able to create a cgi script that will update a html file
: online.
That should be no problem.
What, exactly, is the problem that you are having in writing this?
If you tell us where you are stuck, or show us your broken code,
maybe we could help.
: For example: a web page with certain info about a stores daily specials, i
: need an online form that will automatically update certain html files in
: specific fields, in realtime.
^^^^^^^^^^^
You cannot do realtime stuff with HTTP...
: do u follow?
Sure.
Where's your code?
: plz get back to me...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 27 Oct 1998 10:48:14 +0000
From: lee <lee@juno.ltd.uk>
Subject: windows nt user32.dll initialization and perl
Message-Id: <3635A4EE.CDF0B3D7@juno.ltd.uk>
hi,
i'm running a perl script on nt4 which uses the
Win32::Process::Create module to start up
batch files which start automated ftp sessions,
this runs through approx. every 2 seconds,
starting 5 cmd.exe windows, 4 of which run
an ftp script, these windows exit after a second,
however, after roughly 30 min, i get an error saying
initialization of the User32.dll has failed, this process
will abort abnormally.
i've installed service pack 4, and used regedt32 to
change HKEY_LOCAL_MACHINE\SYSTEM\
CURRENTCONTROLSET\SESSIONMANAGER\
SUBSYSTEMS\WINDOWS adding 512 where
suggested by microsoft to limit the space each
session grabs, but this makes no difference, (even when
set to 64).
watching the taskmanager when killing the parent
process, the physical memory available goes from
about 8000 to about 44000, and the number of handles
goes from about 10000 to about 1200, so i know the
problem is just that system resources aren't being
freed when each batch exits, how do i fix this?
thanks.
lee.
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 4080
**************************************