[10486] in Perl-Users-Digest
Perl-Users Digest, Issue: 4078 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 27 01:06:36 1998
Date: Mon, 26 Oct 98 22: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 Mon, 26 Oct 1998 Volume: 8 Number: 4078
Today's topics:
Re: $INPUT_RECORD_SEPARATOR <r28629@email.sps.mot.com>
-t test in Win32 <kprice@cardinal.co.nz>
Re: Any Chicago Perl Mongers Group? (David Adler)
Re: Array to Hash Keys <r28629@email.sps.mot.com>
Re: Array to Hash Keys (Larry Rosler)
Re: Array to Hash Keys (Ronald J Kimball)
Re: Date Comparision (Ronald J Kimball)
Re: Email address Checker cdtoad@hotmail.com
Is this possible? Apache/FreeBSD/CGI <--> NT/MSSQL ihomebrew@my-dejanews.com
Re: lack of flock() for Win95/98? fix? (Martien Verbruggen)
Mail from Perl on NT <kat@javaranch.com>
Re: Not to start a language war but.. <JamesL@Lugoj.Com>
Re: Not to start a language war but.. <uri@sysarch.com>
ODBC & MS Access <aaron@@primordium.com>
Re: Perl Insert or Update Command (Martien Verbruggen)
problem using LWP::UserAgent :( <cusf1@pen.eiu.edu>
Problem with Win32 reg exp <timpeter@primenet.com>
Re: Problem with Win32 reg exp (Martien Verbruggen)
Re: Problem with Win32 reg exp (Sam Holden)
Re: Problem with Win32 reg exp <timpeter@primenet.com>
Re: Sending mail using perl <luutran@geocities_.com>
Re: Sending mail using perl <jbharvey@auspex.net>
Re: Stranges errors messages <nobody@nowhere.com>
update html files online using online form? <d3_k@videotron.ca>
update html files online using online form? <d3_k@videotron.ca>
Re: update html files online using online form? (Martien Verbruggen)
Re: update html files online using online form? <jbharvey@auspex.net>
Re: What isn't Perl good for? (John Moreno)
Re: What isn't Perl good for? <tchrist@mox.perl.com>
Re: Win32 Registry.pm incosistent for nonexistent tople (Tye McQueen)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 26 Oct 1998 21:40:09 -0500
From: Tk Soh <r28629@email.sps.mot.com>
To: tbhanson@startribune.com
Subject: Re: $INPUT_RECORD_SEPARATOR
Message-Id: <36353281.F6E2E0B0@email.sps.mot.com>
[posted & copy emailed]
tbhanson@startribune.com wrote:
>
> Hi, I'm hoping someone out there has done this. I expect I'm making some
> elementary mistake (or I've found a bug).
Always start with a mistake, a bug isn't easy to comeby nowaday.
[snip]
> use Getopt::Std;
>
> die "bad options!\n" unless getopts('m');
>
> if ($opt_m) {
> # use this to separate lines with carriage return instead of newline (mac)
> $INPUT_RECORD_SEPARATOR = "\r";
^^^^^^^^^^^^^^^^^^^^^^
use English; # see: perldoc perlvar
without this, $INPUT_RECORD_SEPARATOR is just another variable,
Hmm, wouldn't it be quicker to just type $/ ???
Also, if you have use the -w switch, you should have gotten the follow messages:
------------------------------------------------
Name "main::INPUT_RECORD_SEPARATOR" used only once:
possible typo at trial.pl line 12.
Name "main::opt_m" used only once: possible typo at trial.pl line 10.
------------------------------------------------
Remember, -w is your friend. Better still, use strict;
elementary enough? ;)
-tk
------------------------------
Date: Tue, 27 Oct 1998 16:53:15 +1300
From: Kelvin Price <kprice@cardinal.co.nz>
Subject: -t test in Win32
Message-Id: <363543AB.CF5EE67C@cardinal.co.nz>
I am using ActiveState build 502 perl for Win32 and have a problem
with the -t test. It returns true whether or not the script is in
the foreground or running from Windows AT command or a NT Service.
Does anyone know of a reliable way for a perl script running on NT
to determine whether it is in the foreground or the background ?
Thanks in advance,
Kelvin
------------------------------
Date: 27 Oct 1998 04:45:31 GMT
From: dha@panix.com (David Adler)
Subject: Re: Any Chicago Perl Mongers Group?
Message-Id: <713j5c$7dp@news1.panix.com>
On Mon, 26 Oct 1998 16:03:55 GMT, Elaine -HappyFunBall- Ashton
<eashton@bbnplanet.com> wrote:
>David Adler wrote:
>
>> Yeah, but you gotta come to NYC for the dancing Chihuahuas!
>
>Hmmm. Add a bottle of Highland Park to that and it sounds much better
>than dancing girls with donuts :)
Well, we don't mind if you invite the dancing girls, actually. :-)
>> >Beware. MarsNeedsWomen.pm is coming soon to a .pm near you. Be Afraid.
>>
>> I *am* afraid... I've seen the movie. Eek! Bad doesn't begin to
>> describe it...
>
>:) Well, we're serious, of course. We are getting a group together for
>women in Perl. MarsNeedsWomen seems a propos. We will be making a formal
>announcement as soon as we get the mailing list together.
Which of you gets to be Yvonne "Mars Needs Batgirl" Craig? :-)
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"In my opinion, there's nothing in this world beats a '52 Vincent and
a red headed girl" - James Adie
------------------------------
Date: Mon, 26 Oct 1998 22:15:26 -0500
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: Array to Hash Keys
Message-Id: <36353AC3.1C069E29@email.sps.mot.com>
Larry Rosler wrote:
[...]
> > while (<IN>) { $hash_table{$_} = 0; }
> >
[...]
> In the second case, where you don't know how many elements there are a
> priori, if all you're interested in are the hash keys and the values may
> be undefined (as seems likely from your problem statement):
>
> @hash_table{ <IN> } = ();
This might be closer:
grep {$hash_table{$_} = 0} <IN>;
-tk
------------------------------
Date: Mon, 26 Oct 1998 21:51:31 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Array to Hash Keys
Message-Id: <MPG.109eff3e1a986e239898e0@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <36353AC3.1C069E29@email.sps.mot.com> on Mon, 26 Oct 1998
22:15:26 -0500, Tk Soh <r28629@email.sps.mot.com> says...
> Larry Rosler wrote:
> [...]
> > > while (<IN>) { $hash_table{$_} = 0; }
> [...]
> > In the second case, where you don't know how many elements there are a
> > priori, if all you're interested in are the hash keys and the values may
> > be undefined (as seems likely from your problem statement):
> >
> > @hash_table{ <IN> } = ();
>
> This might be closer:
>
> grep {$hash_table{$_} = 0} <IN>;
Absolutely not. The purpose of 'grep' (or 'map', which would make more
sense in this context) is to create a new list from its list operand.
To do that and throw the new list away makes little sense, esthetically
or in terms of efficiency. The original 'while' formulation makes more
sense, and can be improved upon only marginally, by eliminating some
punctuation using inversion:
$hash_table{$_} = 0 while <IN>;
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 27 Oct 1998 00:47:54 -0500
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Array to Hash Keys
Message-Id: <1dhj7ka.9o2kqwdxvltgN@bay1-271.quincy.ziplink.net>
Tk Soh <r28629@email.sps.mot.com> wrote:
> Larry Rosler wrote:
> > @hash_table{ <IN> } = ();
>
> This might be closer:
>
> grep {$hash_table{$_} = 0} <IN>;
Closer to what?
If you are implying that Larry's suggestion does not work, I believe you
are mistaken.
--
_ / ' _ / - aka - rjk@coos.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: Tue, 27 Oct 1998 00:47:56 -0500
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Date Comparision
Message-Id: <1dhj7qh.vv5zuw1l41ptsN@bay1-271.quincy.ziplink.net>
Mike <support@counter.w-dt.com> wrote:
> Does anyone know of a simple snipplet of code that would allow me to
> compare two dates and see if one is latter than the other? I know their
> are modules out their but i just want a simple perl example. Not a 85kb
> module written in C or c++ or perl. Please post a simple way of
> comparing the dates. Thanks for your time.
$date1 > $date2
for a numeric comparison.
$date1 gt $date2
for a string comparison.
If you want a chronological comparison, it gets a bit more involved...
--
_ / ' _ / - aka - rjk@coos.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: Tue, 27 Oct 1998 02:49:11 GMT
From: cdtoad@hotmail.com
Subject: Re: Email address Checker
Message-Id: <713cb7$s4d$1@nnrp1.dejanews.com>
Theres a new book out called the Perl Cookbook and it has an example of how to
use regular expression to do it... Although you can't tell if it's a REAL
account or not. Just a validly formed email.
Dave
In article <70t5e0$mos$1@news.cc.ucf.edu>,
fwf27775@pegasus.cc.ucf.edu (Fritz W Feuerbacher) wrote:
> Has anyone written a sub function that checks an email address for
> vilidity?
>
> --
> Linux - The choice of a gnu generation.
> ‰
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 27 Oct 1998 00:55:25 GMT
From: ihomebrew@my-dejanews.com
Subject: Is this possible? Apache/FreeBSD/CGI <--> NT/MSSQL
Message-Id: <7135lt$ir1$1@nnrp1.dejanews.com>
I have a client who wants to build a web-based database application. Money is
tight so they want it to integrate with their existing NT/MSSQL environment
(which includes a DBA; ergo they do not want to consider MySQL or mSQL
databases).
For the webserver, since $$$ is tight they want to run Apache/FreeBSD.
My initial idea was to develop the application using Java and a 3rd party JDBC
driver. However it seems that solution is going to cost some $$$ (which they
are not *entirely* opposed to, since a week of my frustration = a 10 user
liscense :-).
Here is my question: I've never written a line of CGI (but I have done
plenty 'o Perl) but is it possible to configure an Apache/FreeBSD/CGI app to
talk to a MSSQL server? I saw DBI::Net but it looks like it isn't for MSSQL.
Thank you,
Clark Ritchie
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 26 Oct 1998 23:23:23 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: lack of flock() for Win95/98? fix?
Message-Id: <Lv7Z1.111$z05.132585@nsw.nnrp.telstra.net>
In article <MPG.109ea26d1c4206839896a5@news.supernews.com>,
danbeck@eudoramail.com (Daniel Beckham) writes:
> Try this:
>
> If you need to open a file named myfoo for read or write, first create a
> file named myfoo.lock. When you are finished reading or writing to the
Race condition
# perldoc perlfaq5
/ What can't I just open(FH, ">file.lock")?
(Should of course be "Why can't..." or maybe "What? Can't..." :))
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Mon, 26 Oct 1998 15:00:22 +0000
From: kat <kat@javaranch.com>
Subject: Mail from Perl on NT
Message-Id: <36348E80.2D88@javaranch.com>
I'm new to Perl and CGI and have scripts which send mail and work on my
ISP's Unix server, using:
$mailprog = '/usr/sbin/sendmail';
open(MAIL, "|$mailprog $recipient")
then all the other print MAIL statements.
My questions are:
1) Will this work also on NT?
is it much too hopeful to think that the only change will involve
changing the $mailprog variable?
2) Not related to mail... does flock work on NT? I have read conflicting
notes on this, or are you required to do your own lock/flag semaphores
using temporary files?
Thanks,
Kat
------------------------------
Date: Mon, 26 Oct 1998 21:07:49 -0800
From: James Logajan <JamesL@Lugoj.Com>
Subject: Re: Not to start a language war but..
Message-Id: <36355525.50F0C274@Lugoj.Com>
Abigail wrote:
> It isn't at all surprising if you know Perl. Not really well, just a tiny
> bit. Then you would know that '$' is used for *scalars*, and Perl will
> figure out if you want a string, integer, float, or reference.
Thank you; my mistake has been pointed out to me by several people both
nicely and not so nicely. Actually the result is that I mistakenly gave
the Perl "$" more information than it actually supplied. It has been
almost 2 years since I looked at the language; I should have reviewed my
copy of "Programming Perl" before posting (see, I do own a copy). I may
actually intermixed Tcl syntax and concepts with Perl, both of which I
looked at about the same time. Horrible gaff. Still, I think my essential
point remains unaffected.
> 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.
IMHO you are paying an uneeded price to avoid name clashes. Besides,
I think that Bourne adopted the $ notation to avoid shell variable name
clashes with file names. Not really something a generalized scripting
language should be built around, IMHO.
> 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.
Ok. Of course my rhetoric isn't so much directed at die-hard users of
Python or Perl, but at those unlikely few lurkers who haven't decided
which language to dive into. The danger of course is that I may come
across as being too fanatic. I am of course, but I hate to let it
show too much <wink>.
P.S. Since I have posted quite heavily on this thread, I'll make
this my last post so that gentle Perlers (Perlists?) may have
the last say on my possibly dubious arguments. Can't speak for
other Pyoneers (or Pythoners) of course.
P.P.S. What DO Perl programmers call themselves? Perlers? Perlists?
Something else? I think Python programmers are just beginning to grapple
with that issue, based on some recent threads.
------------------------------
Date: 27 Oct 1998 00:51:48 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Not to start a language war but..
Message-Id: <x7d87eft6z.fsf@sysarch.com>
>>>>> "JL" == James Logajan <JamesL@Lugoj.Com> writes:
JL> P.P.S. What DO Perl programmers call themselves? Perlers?
JL> Perlists? Something else? I think Python programmers are just
JL> beginning to grapple with that issue, based on some recent
JL> threads.
it tells a lot about the origins of perl and the psychology of its
users, that we proudly call ourselves perl hackers!
what do python users call themselves? indentured anal(lysts)? :-)
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Mon, 26 Oct 1998 19:47:17 -0800
From: "Aaron Henderson" <aaron@@primordium.com>
Subject: ODBC & MS Access
Message-Id: <713fpe$ecq$1@news.junction.net>
I'm working on a perlScript for reading information from a MS Access
database (Win32::ODBC). I'm basically searching through the listings and
finding keyword matches. What I need to do is record what Row I found a hit
at and then later read from this Row to display the information. I've been
reading through the FAQ's but I can't seem to find out how to read from a
specific row. The only way I can see of getting to a certain row right now
is by using:
while($db->FetchRow) {
# process the row
}
... and then testing to see which Row it is at. There must be a faster
route I'm missing? Or maybe I'm approaching this the wrong way.
Any information on this and on faster ways of searching Access databases is
muchly appreciated!
Aaron
Primordium Productions - www.primordium.com
------------------------------
Date: Mon, 26 Oct 1998 22:52:55 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl Insert or Update Command
Message-Id: <b37Z1.98$z05.132585@nsw.nnrp.telstra.net>
In article <Pine.SUN.3.91.981026041143.26623D-100000@jupiter.cs.wayne.edu>,
Sudheer Havaligi <suh@jupiter.cs.wayne.edu> writes:
> Hi all,
> I'm trying to run a perl insert command. Please someone give me
> the systax for the perl insert command with "where" clause.
> I'm able to insert, but without 'where' clause. If i'm trying to put
> 'where' clause i'm getting problems. I mean i'm not getting any errors
> but the database is not being updated.
Perl doesn't have an insert command or a where clause. Perl is not
SQL. if you have trouble connecting to a database using one of the
perl modules, you should at least mention which database, and which
software you are using. Send us a little tiny snippet of code that
goes wrong, and we'll have a look at it.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Mon, 26 Oct 1998 19:20:57 -0600
From: Sebastien Flacher <cusf1@pen.eiu.edu>
Subject: problem using LWP::UserAgent :(
Message-Id: <36351FF9.5528168E@pen.eiu.edu>
Hi all,
I try to realize a rePOST from a Perl CGI to another one, using LPW.
I think I have a problem with the installation of the LPW module.
I always get the same error message from the Perl interpreter:
--------------
Can't locate auto/LWP/UserAgent/_need_proxy.al in @INC
(@INC contains:
/usr/local/lib/perl5/sun4-solaris/5.00404
/usr/local/lib/perl5
/usr/local/lib/perl5/site_perl/sun4-solaris
/usr/local/lib/perl5/site_perl .)
at /usr/local/lib/perl5/site_perl/LWP/UserAgent.pm line 181
---------------
Here is my script:
#!/usr/local/bin/perl
use HTTP::Request::Common qw (POST);
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$url = "http://add-url.altavista.com/cgi-bin/newurl";
$form="ads=1&q=http://www.server.com/index.html";
$request = new HTTP::Request('POST', $url, undef, $form);
$request->header('Content-type','application/x-www-form-urlencoded');
$response = $ua->request($request, undef, undef);
$str = $response->as_string;
print $str;
exit 0 ;
-----------------------
Has somebody an idea about this error message ?
Thanks in advance, Seb
------------------------------
Date: Mon, 26 Oct 1998 20:43:26 -0700
From: "Tim Peter" <timpeter@primenet.com>
Subject: Problem with Win32 reg exp
Message-Id: <713flh$iht$1@nnrp03.primenet.com>
OK, I'm gonna get hammered for this, but...
I'm a long time lurker, first-time poster. I'm required to write a Perl
script on an NT box due to current project. I've checked the FAQs, the man
pages, AND Deja News archives, but... I couldn't find an answer to this
anywhere. If you know the answer, or where I can find it, please let me
know. Private e-mail is OK to conserve bandwidth.
This reg exp fails and I don't know why:
perl -e 's/foo/bar/gi' -p -i.bak *.txt
This isn't CGI, it's at a command prompt. It must be a limitation of Win32,
but I can't figure out how to get around it. Any help would be appreciated.
------------------------------
Date: Tue, 27 Oct 1998 04:44:12 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Problem with Win32 reg exp
Message-Id: <wccZ1.178$z05.326510@nsw.nnrp.telstra.net>
In article <713flh$iht$1@nnrp03.primenet.com>,
"Tim Peter" <timpeter@primenet.com> writes:
> OK, I'm gonna get hammered for this, but...
Not at all, because:
> I'm a long time lurker, first-time poster. I'm required to write a Perl
> script on an NT box due to current project. I've checked the FAQs, the man
> pages, AND Deja News archives, but... I couldn't find an answer to this
> anywhere. If you know the answer, or where I can find it, please let me
> know. Private e-mail is OK to conserve bandwidth.
you have looked in the docs.
> This reg exp fails and I don't know why:
>
> perl -e 's/foo/bar/gi' -p -i.bak *.txt
>
> This isn't CGI, it's at a command prompt. It must be a limitation of Win32,
> but I can't figure out how to get around it. Any help would be appreciated.
It's not that the regexp fails, it's that the shell that comes with NT
is different from the ones that perl normally assumes. There have been
some discussions about this on this newsgroup in the past, and you may
be able to find some stuff on dejanews.
It's also important to know which version of perl you are using. Some
versions expand the *.txt for you, others don't, in which case a
wilcard on the command line to perl just won't work. I also don't
think single quotes work very well on NT, but I'm not sure about that.
All I can do at this point, is tell you to look through the dejanews
archives. If you can't find anything there, post again, and mention
which perl version you're running.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: 27 Oct 1998 05:18:12 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Problem with Win32 reg exp
Message-Id: <slrn73alsk.2v5.sholden@pgrad.cs.usyd.edu.au>
On Mon, 26 Oct 1998 20:43:26 -0700, Tim Peter <timpeter@primenet.com> wrote:
>OK, I'm gonna get hammered for this, but...
>
>This reg exp fails and I don't know why:
>
>perl -e 's/foo/bar/gi' -p -i.bak *.txt
>
>This isn't CGI, it's at a command prompt. It must be a limitation of Win32,
>but I can't figure out how to get around it. Any help would be appreciated.
What does fail mean :
deletes all files on the computer,
reboots the machine,
perl gives a erro and quits,
etc...
And what do you expect it to do???
For what it's worth it replaces all occurances of foo with bar in all the
.txt files in the current directory for me... under linux and NT.
--
Sam
Just don't create a file called -rf. :-)
--Larry Wall
------------------------------
Date: Mon, 26 Oct 1998 22:28:58 -0700
From: "Tim Peter" <timpeter@primenet.com>
Subject: Re: Problem with Win32 reg exp
Message-Id: <713lre$3ut$1@nnrp02.primenet.com>
You called it. It was the single quotes. I changed it double quotes and it
worked perfectly! Thanks for the assist
BTW, here's my version:
perl version 5.003_07 + suidperl security patch
Perl for Win32 Build 316 - Built 09:44:44 Mar 13 1998
God, I love Perl!
Martien Verbruggen wrote in message ...
> <Much omitted for brevity>
>It's not that the regexp fails, it's that the shell that comes with NT
>is different from the ones that perl normally assumes. There have been
>some discussions about this on this newsgroup in the past, and you may
>be able to find some stuff on dejanews.
>
><further deletia>
>I also don't
>think single quotes work very well on NT, but I'm not sure about that.
------------------------------
Date: 27 Oct 1998 04:36:10 GMT
From: "Luu Tran" <luutran@geocities_.com>
Subject: Re: Sending mail using perl
Message-Id: <8CFE.82FF2FBE55luutrangeocitiescom@news.mindspring.com>
"Dan Tropea" dtropea@cabletron.com wrote in <3634C55A.1AC6@cabletron.com>:
> I have created a perl cgi program that will take a html form and
> process the data. The question is once i process the data i
> know how to shove the data into a output file but i would like to
> also automatically send the data to a person via e-mail.
>
> Any suggestions.
>
> Thank you.
You can use sendmail, but it's probably safer (and more portable) to
use Net::SMTP;
Look in the cpan archive if you don't have this package.
--
luu
Please remove the underscore _ in my address if you wish to reply by email.
------------------------------
Date: Tue, 27 Oct 1998 05:56:06 GMT
From: "Justin B. Harvey" <jbharvey@auspex.net>
Subject: Re: Sending mail using perl
Message-Id: <36356075.82327645@auspex.net>
Are there any issues with:
open MAIL, "|mail $address" or die "mail not found, duh\n";
print MAIL "Subject: Hello\n";
print MAIL "Yadda yadda yadda\n";
close MAIL;
Security concerns? Just a different way? I'd be interesting in getting
comments :>
Geir Sjurseth wrote:
>
> Sure all you gotta do is issue commands directly to sendmail.
> like so:
>
> open(MAIL,"|sendmail -t"); ## Sendmail -t tells it to wait for each command
> individually ##
> print MAIL "TO: whoever\@wherever.com\n";
> print MAIL "FROM: whoever\@wherever.com\n";
> print MAIL "Subject: whatever the subject is\n";
> print MAIL "the body of your message\n";
> print MAIL ".\n";
> close (MAIL);
> in lieu of manually typing out the body you just port over the <textarea>
> from your html.
>
> It is quick and easy....
------------------------------
Date: Tue, 27 Oct 1998 15:47:42 +1100
From: Nobody <nobody@nowhere.com>
Subject: Re: Stranges errors messages
Message-Id: <3635506E.1688FE63@nowhere.com>
Felix Maurer wrote:
>
> Hello all,
>
> Since yesterday, I'm having stranges errors on my system when using perl.
> The simple following command is an example:
>
> # perl -e 'print "test";'
> use: Command not found.
> cnt: Undefined variable.
Those are messages that come from the shell, not perl. For some reason
the shell is interpreting your script (even though in the above example,
you don't specify it).
My first thought is that you have a perl script somewhere in your path
before the perl executable.
A 'whence perl' or 'which perl' command should help here.
Regards,
AC.
------------------------------
Date: Mon, 26 Oct 1998 22:12:03 -0500
From: "d3_k" <d3_k@videotron.ca>
Subject: update html files online using online form?
Message-Id: <GRaZ1.884$iT1.1926@weber.videotron.net>
Hi, I need to be able to create a cgi script that will update a html file
online.
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.
do u follow?
plz get back to me...
Regards
Marco Nespeca
------------------------------
Date: Mon, 26 Oct 1998 22:12:03 -0500
From: "d3_k" <d3_k@videotron.ca>
Subject: update html files online using online form?
Message-Id: <GUaZ1.886$iT1.1260@weber.videotron.net>
Hi, I need to be able to create a cgi script that will update a html file
online.
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.
do u follow?
plz get back to me...
Regards
Marco Nespeca
------------------------------
Date: Tue, 27 Oct 1998 04:40:26 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: update html files online using online form?
Message-Id: <_8cZ1.176$z05.326510@nsw.nnrp.telstra.net>
In article <GUaZ1.886$iT1.1260@weber.videotron.net>,
"d3_k" <d3_k@videotron.ca> writes:
> Hi, I need to be able to create a cgi script that will update a html file
> online.
use CGI;
> 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.
Create a HTML form that accepts the info you need. Create a CGI script
that parses the stuff that comes out of the form.
Open the HTML file for writing. Write the new information. close the
HTML file.
> do u follow?
u = you, I suppose?
> plz get back to me...
plz = please, I suppose?
If you think I am being difficult, think again. You didn't ask any
question about perl, so I can't give you any perl. If you are looking
for ready-made solutions, you are looking in the wrong place. We can't
even give you any suggestions which are more specific than this,
because we don't know squat about your problem, if there is any.
BTW: What have you tried?
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Tue, 27 Oct 1998 05:58:12 GMT
From: "Justin B. Harvey" <jbharvey@auspex.net>
Subject: Re: update html files online using online form?
Message-Id: <363560F3.50D3A9D7@auspex.net>
Marco,
You might perhaps want to either hire someone or buy the Learning Perl
book, and then reda the perl documentation on CGI.pm.
j
d3_k wrote:
>
> Hi, I need to be able to create a cgi script that will update a html file
> online.
> 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.
>
> do u follow?
>
> plz get back to me...
>
> Regards
> Marco Nespeca
------------------------------
Date: Tue, 27 Oct 1998 00:06:51 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: What isn't Perl good for?
Message-Id: <1dhj6wr.155mssxkasb4aN@roxboro0-006.dyn.interpath.net>
Tom Christiansen <tchrist@mox.perl.com> wrote:
> --tom
> -- "If Dennis Ritchie were the man who developed Modula-2 then C would be
> long forgotten."
> --Tarjei Jensen
Not really perl related but better than the troll - this sounds profound
but I can't figure out what it means. Any idea?
--
John Moreno
------------------------------
Date: 27 Oct 1998 01:20:35 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: What isn't Perl good for?
Message-Id: <713753$obp$1@csnews.cs.colorado.edu>
In comp.lang.perl.misc, jlewchuk@junctionnet.com writes:
:I believe localization is my biggest concern: the ability to structure an
:entire program as a hierarchical series of modules, each containing its own
:environment. Such a task is natural in some ASM, C, heck, most programming
:languages, but not in perl.
The only practical effect of such an idiotic statement is to prove to
the whole world once again that you are either a very terrible programmer
or a else a despicable troll. In any event, welcome to the killfile.
--tom
--
"If Dennis Ritchie were the man who developed Modula-2 then C would be long forgotten."
--Tarjei Jensen
------------------------------
Date: 26 Oct 1998 13:22:04 -0600
From: tye@fohnix.metronet.com (Tye McQueen)
Subject: Re: Win32 Registry.pm incosistent for nonexistent toplevel keys
Message-Id: <712i4s$d69@fohnix.metronet.com>
bobn@interaccess.com (Bob N.) writes:
) Registry.pm exports toplevel keynames which may not exist on all systems.
And it exports them to main::, not whatever package the
"use Win32::Registry" was in. And it was a bad design choice
to export objects with the same names as constants. And...
I suggest you get libwin32 and switch to Win32::TieRegistry
and/or Win32API::Registry. They even, *gasp*, come with
documentation.
If you build libwin32-0.13 with Perl5 that is not configured
to use PERL_OBJECT, then comment out the CAPI line in
APIRegistry/Makefile.PL to work around a bug in certain
versions of Perl5.
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
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 4078
**************************************