[19864] in Perl-Users-Digest
Perl-Users Digest, Issue: 2059 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 3 18:05:53 2001
Date: Sat, 3 Nov 2001 15:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1004828708-v10-i2059@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 3 Nov 2001 Volume: 10 Number: 2059
Today's topics:
Re: Bold text in UNIX and Windows <r_larsen@image.dk>
Re: Bold text in UNIX and Windows (Clinton A. Pierce)
Form Details <roger.petch@ntlworld.com>
Re: Form Details <tony_curtis32@yahoo.com>
Re: Form Details <echang@netstorm.net>
Form <roger.petch@ntlworld.com>
Re: Form <Laocoon@eudoramail.com>
Re: Form <tony_curtis32@yahoo.com>
Re: Form (David Efflandt)
get the time since last file-access <robert.busching@web.de>
Re: get the time since last file-access <Laocoon@eudoramail.com>
Re: get the time since last file-access <tony_curtis32@yahoo.com>
Good Perl Tutorials ??? (brown)
Re: Good Perl Tutorials ??? <graham.drabble@lineone.net>
Re: Handling file in perl.....please help (Clinton A. Pierce)
Re: How to store a table and retrieve items? (Jeff Zucker)
Newbie help please with free perl form scripts <robin1@otenet.gr>
Re: Newbie help please with free perl form scripts <tim@vegeta.ath.cx>
Re: Newbie help please with free perl form scripts <robin1@otenet.gr>
Re: Perl on Windows2000 <darkon@one.net>
Re: reading flat-file db and replacing a word <bootsy52@gmx.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 03 Nov 2001 19:28:08 +0100
From: R. A. Larsen <r_larsen@image.dk>
Subject: Re: Bold text in UNIX and Windows
Message-Id: <VA.0000012c.0004fc83@r_larsen>
Walter Usyk <usyk@home.com> wrote:
>
> I was wondering if it is possible to do output the following line of
> text with some bold words inside of the text output. I need to do this
> in UNIX and Windows:
>
> I would like to display the following :
>
> 28-Nov.16:04 DBUZULOI branch type "dbuzuloi_ott.20" (locked)
>
> If anyone is familiar, this is the way ClearCase does it for their
> command output.
>
> I tried using the ANSIColor package but it only works in UNIX and in
> Windows NT I got fuuny looking results like this:
>
> F:\Downloads\Perl>perl color.pl
> ?[31mDanger, Will Robinson!
It looks to me like you haven't installed the ANSI.SYS device driver. I'm using
Win95 and I have the following line in C:\CONFIG.SYS :
Device=C:\Windows\Command\Ansi.sys
I don't know if ANSI.SYS exists in Windows NT.
Regards, René
--
Using Virtual Access
http://www.vamail.com
------------------------------
Date: Sat, 03 Nov 2001 19:27:34 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Bold text in UNIX and Windows
Message-Id: <GyXE7.228956$K6.109094662@news2>
[Posted and mailed]
In article <3BE36277.3040309@home.com>,
Walter Usyk <usyk@home.com> writes:
> I was wondering if it is possible to do output the following line of
> text with some bold words inside of the text output. I need to do this
> in UNIX and Windows:
Portably? hmm. Best thing to do is assume ANSI for windows (like you're
doing). For Unix -- because there's lots and lots of terminal types --
you're going to have to interrogate the termcap database (or terminfo)
to find out the control codes to use.
Then the best thing to do would be to write wrapper functions for
everything, or store the control strings in well-known variables that
you can just print appropriately. Something like:
if ($^O =~ /Win/) {
$inverse=...... # The ANSI module's idea of inverse...
$normal=...... # The ANSI module's idea of normal...
} else {
$inverse=`tput smso`;
$normal=`tput rmso`;
}
print "This is a ${inverse}Hoot!${normal}.";
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours *and*
clintp@geeksalad.org Perl Developer's Dictionary
"If you rush a Miracle Man, for details, see http://geeksalad.org
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: Sat, 3 Nov 2001 18:40:40 -0000
From: "roger.petch" <roger.petch@ntlworld.com>
Subject: Form Details
Message-Id: <MQWE7.7154$Cl3.1637696@news6-win.server.ntlworld.com>
Hi,
Thanks for the previous replies. What I am gonna have is this:
Three drop down menus. One with 5 options, one with 3 options and the other
with 2. When this is submitted I want it to search a database or something
and find items that match the options entered in the form. I then want a
page generated for the user showing links to the matches of their search.
Hope this make it more clear.
------------------------------
Date: Sat, 03 Nov 2001 12:48:05 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Form Details
Message-Id: <87ady3hesa.fsf@limey.hpcc.uh.edu>
>> On Sat, 3 Nov 2001 18:40:40 -0000,
>> "roger.petch" <roger.petch@ntlworld.com> said:
> Three drop down menus. One with 5 options, one with 3
> options and the other with 2. When this is submitted I
> want it to search a database or something and find items
> that match the options entered in the form. I then want
> a page generated for the user showing links to the
> matches of their search. Hope this make it more clear.
Nope.
There are so many possible interpretations that noone
could know where to start.
Are you developing a GUI? Is this a CGI question in
disguise? A "vt100" type terminal dialog?
Your description assumes far too much. Give context,
examples...
--
Oh! I've said too much. Smithers, use the amnesia ray.
------------------------------
Date: Sat, 03 Nov 2001 20:55:13 GMT
From: "E.Chang" <echang@netstorm.net>
Subject: Re: Form Details
Message-Id: <Xns914EA2F31D7D1echangnetstormnet@207.106.93.86>
"roger.petch" <roger.petch@ntlworld.com> wrote in
news:MQWE7.7154$Cl3.1637696@news6-win.server.ntlworld.com:
> Hi,
>
> Thanks for the previous replies. What I am gonna have is this:
>
> Three drop down menus. One with 5 options, one with 3 options and
> the other with 2. When this is submitted I want it to search a
> database or something and find items that match the options entered
> in the form. I then want a page generated for the user showing
> links to the matches of their search. Hope this make it more clear.
You can do this in five basic steps:
1. Learn HTML (Assuming you mean a form for users on the Web)
2. Learn Database principles
3. Learn Perl
4. Learn how to interface with a database using Perl (use DBI...)
5. Learn how to interface with the user's browser through the web
server (use CGI...)
After that, you should be able to formulate a specific question in
sufficient detail that it can be answered.
--
EBC
------------------------------
Date: Sat, 3 Nov 2001 14:33:00 -0000
From: "roger.petch" <roger.petch@ntlworld.com>
Subject: Form
Message-Id: <FcTE7.5362$Cl3.1420234@news6-win.server.ntlworld.com>
Hi.
This is what I want to do:
Have a form that when submitted presents the user with results based on the
criteria they entered. Sadly I have no idea how to do this. there will be
three drop down menus with one choice being made from each.
Any ideas, solutions etc.. much appreciated.
------------------------------
Date: Sat, 3 Nov 2001 16:01:56 +0100
From: Laocoon <Laocoon@eudoramail.com>
Subject: Re: Form
Message-Id: <Xns914EA31BE6496Laocooneudoramailcom@62.153.159.134>
> Hi.
>
> This is what I want to do:
>
> Have a form that when submitted presents the user with results based on
> the criteria they entered. Sadly I have no idea how to do this. there
> will be three drop down menus with one choice being made from each.
>
> Any ideas, solutions etc.. much appreciated.
>
>
Doesn't look like a Perl question.. more like a HTML question..
------------------------------
Date: Sat, 03 Nov 2001 09:32:51 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Form
Message-Id: <87668rj2e4.fsf@limey.hpcc.uh.edu>
>> On Sat, 3 Nov 2001 14:33:00 -0000,
>> "roger.petch" <roger.petch@ntlworld.com> said:
> Hi. This is what I want to do:
> Have a form that when submitted presents the user with
> results based on the criteria they entered. Sadly I have
> no idea how to do this. there will be three drop down
> menus with one choice being made from each.
> Any ideas, solutions etc.. much appreciated.
Write a program.
You've provided no other information to go on.
--
Oh! I've said too much. Smithers, use the amnesia ray.
------------------------------
Date: Sat, 3 Nov 2001 17:56:37 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Form
Message-Id: <slrn9u8bul.m3n.efflandt@typhoon.xnet.com>
On Sat, 3 Nov 2001, roger.petch <roger.petch@ntlworld.com> wrote:
> Hi.
>
> This is what I want to do:
>
> Have a form that when submitted presents the user with results based on the
> criteria they entered. Sadly I have no idea how to do this. there will be
> three drop down menus with one choice being made from each.
>
> Any ideas, solutions etc.. much appreciated.
Perhaps the Perl Tk module. On the other hand if this is a stealth CGI
question see 'perldoc CGI' and a .cgi newsgroup and FAQ (CGI is OT here
since questions often apply to any scripting or programming language).
--
David Efflandt - All spam is ignored - http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
------------------------------
Date: Sat, 3 Nov 2001 15:54:14 +0100
From: "Robert Busching" <robert.busching@web.de>
Subject: get the time since last file-access
Message-Id: <newscache$9ph8mg$3i1$1@news.berlinweb.de>
Hi,
i have a problem, with which function I get the time which is gone since the
last file-access? test -M doesn't seem to work,
mfg
Robert Busching
------------------------------
Date: Sat, 3 Nov 2001 16:01:09 +0100
From: Laocoon <Laocoon@eudoramail.com>
Subject: Re: get the time since last file-access
Message-Id: <Xns914EA2F9F6D56Laocooneudoramailcom@62.153.159.134>
> i have a problem, with which function I get the time which is gone
> since the last file-access? test -M doesn't seem to work,
perldoc -f stat
Lao
------------------------------
Date: Sat, 03 Nov 2001 09:33:48 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: get the time since last file-access
Message-Id: <871yjfj2cj.fsf@limey.hpcc.uh.edu>
>> On Sat, 3 Nov 2001 15:54:14 +0100,
>> "Robert Busching" <robert.busching@web.de> said:
> Hi, i have a problem, with which function I get the time
> which is gone since the last file-access? test -M
> doesn't seem to work
^^^^^^^^^^^^^^^^^^^^
SCREAM!
What does "doesn't work" mean? Example code? Example
data? Input, output, error messages?
--
Oh! I've said too much. Smithers, use the amnesia ray.
------------------------------
Date: 3 Nov 2001 11:49:16 -0800
From: brown@mad.scientist.com (brown)
Subject: Good Perl Tutorials ???
Message-Id: <4ad84303.0111031149.7a4fd97e@posting.google.com>
Hi does anyone knows a good site that offers Perl Tutorials, well
done, easy to naviguate and accurate???
Please post me the URL.
Thank you
sincerely
Me. :-)
------------------------------
Date: 3 Nov 2001 20:17:06 GMT
From: Graham Drabble <graham.drabble@lineone.net>
Subject: Re: Good Perl Tutorials ???
Message-Id: <Xns914ECDE8ADB53grahamdrabblelineone@ID-77355.user.dfncis.de>
brown@mad.scientist.com (brown) wrote in
news:4ad84303.0111031149.7a4fd97e@posting.google.com:
> Hi does anyone knows a good site that offers Perl Tutorials, well
> done, easy to naviguate and accurate???
>
I've found
<URL:http://www.netcat.co.uk/rob/perl/win32perltut.html> and
<URL:http://www.inlink.com/~perlguy/internet99/part1.html> and found
them OK. I'll let someone more qualified say whether or not they
teach good practices.
--
Graham Drabble
If you're interested in what goes on in other groups or want to find
an interesting group to read then check news.groups.reviews for what
others have to say or contribute a review for others to read.
------------------------------
Date: Sat, 03 Nov 2001 19:22:15 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Handling file in perl.....please help
Message-Id: <HtXE7.228952$K6.109089479@news2>
[Posted and mailed]
In article <9rvuir$q4u$1@lust.ihug.co.nz>,
"fail006" <fail006@hotmail.com> writes:
> Hi,
> I am using my script write the output to a file. I have noticed when the
> file is already open, and if i run my script, there is nothing written to
> the file. Although this is fine, but i would like to use my script to detect
> if the file is currently open or not. If it is open than a message so be
> printed out telling the use to close the file and rerun the script.....
> So my question is how do i know if the file is currently open by notepad or
> any other application
> I programming on Win32 platform (win98)
On Win98 you can't open the file for writing by more than one process.
IIRC, the second open fails with an appropriate message. This should be
your clue that something went wrong:
# Untested
if (! open(FILE, "foo.foo") ) {
if ($!=~/in use/) {
print "The file's in use. Try again later.";
exit;
} else {
die $!;
}
}
Of course, make sure that the error says that the file is "in use".
(Print $! to make sure...I don't recall offhand.)
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours *and*
clintp@geeksalad.org Perl Developer's Dictionary
"If you rush a Miracle Man, for details, see http://geeksalad.org
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: 3 Nov 2001 12:25:59 -0800
From: jeff@vpservices.com (Jeff Zucker)
Subject: Re: How to store a table and retrieve items?
Message-Id: <bcbfff50.0111031225.772ab154@posting.google.com>
David Wall <darkon@one.net> wrote in message news:<Xns914D8B7B2C6A3darkononenet@207.126.101.97>...
> ississauga@hotmail.com wrote on 02 Nov 2001:
> >
> > A table has prices for items having width and height,
[snip]
> If you use Jeff Zucker's AnyData module then you can expand the table at
> will and not have to worry. Well, not much -- you do have to make sure
> that each combination of height category and width category is unique.
You don't have to worry even if there are non-unique combinations.
See below.
> use strict;
> use warnings;
> use AnyData;
>
> my $width = 5.9;
> my $height = 2;
>
> my $table = adTie( 'ARRAY',
> [['hcat','wcat', 'price'],
> [ 2, 3, 212],
> [ 2, 6, 229],
> [ 2, 8, 246],
> [ 6, 3, 230],
> [ 6, 6, 244],
> [ 6, 8, 274],
> [ 9, 3, 241],
> [ 9, 6, 271],
> [ 9, 8, 291]]
> );
>
> my $price = $table->{
> {wcat => ">= $width", hcat => ">= $height"}
> }[0]{'price'};
That will work fine if you only want to grab the first of potentially
several prices that match the criteria. If you want to grab all of
the prices for rows matching the criteria (even if there are
non-unique rows or combinations), do this instead of that price line:
while (my $row = each %$table) {
next unless $row->{wcat} >= $width;
next unless $row->{hcat} >= $height;
print " $row->{price}\n";
}
--
Jeff
------------------------------
Date: Sat, 3 Nov 2001 18:59:33 -0800
From: "Dynamo" <robin1@otenet.gr>
Subject: Newbie help please with free perl form scripts
Message-Id: <9s182g0178l@enews1.newsguy.com>
This is a multi-part message in MIME format.
------=_NextPart_000_0120_01C16499.ACCD63C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I asked my ISP for the location of my sendmail prog and got the =
following reply:
=20
net2 uses Windows 2000 servers so the above information is not relevant. =
PERL was originally a UNIX language and although it runs fine on NT, =
there are some changes that are needed.
For ASP, we have the mailing components JMail and CDONTS. We also =
support the AdRotator and have Persit's ASP Upload. Fasthosts have the =
full version of Active State v5.6 Perl installed but have no other =
modules installed for it. Blat is also installed on all servers.
This being the case, how can I configure formmail.pl to work on my =
server? (Yes I know that formmail.pl is not considered to be one of the =
best but I have got thus far and this is all a good learning =
experience). I have configured the pl file to my host name, recipients =
to my email address etc etc. but have left the $sendmail variable at the =
default cos now I don't know what to put there. My form seems to work =
fine and I get confirmation message saying that info has been sent but I =
do not recieve the email.
It might be off topic for this NG and if so I apologise but since I am a =
total newbie I don't know where else to go cos my ISP offers no support =
for CGI or perl scripts and as such have the following questions:
1) Can I use formmail.pl on my site and if so what do I need to do to =
get it to work? If not can somebody please direct me to a free perl form =
script that will work on WIN 2000 NT=20
2) What or who is Fasthosts and what is Activestate Perl compared to =
perl?
3) What is Blat?
Any help greatly appreciated. I have searched the 7283 messages within =
this NG using FAQ, Form, Formmail as the query but didn't find any =
related messages so hopefully this is not a duplication.
Regards
Paul Robinson
=20
=20
------=_NextPart_000_0120_01C16499.ACCD63C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi,<BR>I asked my ISP for the location =
of my=20
sendmail prog and got the following reply:<BR> <BR><EM>net2 uses =
Windows=20
2000 servers so the above information is not relevant. PERL was =
originally a=20
UNIX language and although it runs fine on NT, there are some changes =
that are=20
needed.</EM></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><EM>For ASP, we have the mailing =
components JMail=20
and CDONTS. We also support the AdRotator and have Persit's ASP Upload.=20
Fasthosts have the full version of Active State v5.6 Perl installed but =
have no=20
other modules installed for it. Blat is also installed on all=20
servers.</EM></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>This being the case, how can I =
configure=20
formmail.pl to work on my server? (Yes I know that formmail.pl is not =
considered=20
to be one of the best but I have got thus far and this is all a good =
learning=20
experience). I have configured the pl file to my host name, recipients =
to=20
my email address etc etc. but have left the $sendmail variable at =
the=20
default cos now I don't know what to put there. My form seems to =
work fine=20
and I get confirmation message saying that info has been sent but I do =
not=20
recieve the email.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>It might be off topic for this NG =
and if so I=20
apologise but since I am a total newbie I don't know where else to =
go cos=20
my ISP offers no support for CGI or perl scripts and as such have the =
following=20
questions:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>1) Can I use formmail.pl on my site and =
if so what=20
do I need to do to get it to work? If not can somebody please direct me =
to a=20
free perl form script that will work on WIN 2000 NT</FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>2) What or who is Fasthosts and =
what is=20
Activestate Perl compared to perl?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>3) What is Blat?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Any help greatly appreciated. I have =
searched the=20
7283 messages within this NG using FAQ, Form, Formmail as the query but =
didn't=20
find any related messages so hopefully this is not a =
duplication.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Paul Robinson</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> </FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2> </FONT></DIV></BODY></HTML>
------=_NextPart_000_0120_01C16499.ACCD63C0--
------------------------------
Date: Sat, 03 Nov 2001 20:51:53 GMT
From: Tim Hammerquist <tim@vegeta.ath.cx>
Subject: Re: Newbie help please with free perl form scripts
Message-Id: <slrn9u8mkn.vh6.tim@vegeta.ath.cx>
Me parece que Dynamo <robin1@otenet.gr> dijo:
> I asked my ISP for the location of my sendmail prog and got the =
> following reply:
> =20
> net2 uses Windows 2000 servers so the above information is not relevant. =
> PERL was originally a UNIX language and although it runs fine on NT, =
> there are some changes that are needed.
Interesting phrasing. Why did they tell you about perl when you asked
about sendmail?
> For ASP, we have the mailing components JMail and CDONTS. We also =
> support the AdRotator and have Persit's ASP Upload. Fasthosts have the =
> full version of Active State v5.6 Perl installed but have no other =
> modules installed for it. Blat is also installed on all servers.
When I asked an ISP admin to install an ASP component, between ASPMail
(~$50) and ASPEMail ($0), he chose ASPEmail and we had no problems.
Perl OTOH needs no ASP components to send email.
> This being the case, how can I configure formmail.pl to work on my =
> server? (Yes I know that formmail.pl is not considered to be one of the =
> best but I have got thus far and this is all a good learning =
> experience). I have configured the pl file to my host name, recipients =
> to my email address etc etc. but have left the $sendmail variable at the =
> default cos now I don't know what to put there. My form seems to work =
> fine and I get confirmation message saying that info has been sent but I =
> do not recieve the email.
All in all, blat is probably the closest to sendmail that your ISP has.
You may just want to modify your script to use blat.exe instead. Of
course, I've never used blat, preferring perl, so don't take my word for
it. ;)
> It might be off topic for this NG and if so I apologise but since I am a =
> total newbie I don't know where else to go cos my ISP offers no support =
> for CGI or perl scripts and as such have the following questions:
>
> 1) Can I use formmail.pl on my site and if so what do I need to do to =
> get it to work? If not can somebody please direct me to a free perl form =
> script that will work on WIN 2000 NT=20
I have no experience with formmail.pl (but it sounds like an old
script), but you may have to modify/replace it for it to work on WinNT
(which has no standard "sendmail" program). When I was in a very
similar situation, I used Jenda Krynicky's Mail::Sender module
< http://jenda.krynicky.cz/#Mail::Sender > for the following reasons:
1. It's pure perl (doesn't require compilation) and doesn't need to
be installed by the admin.
2. Uses sockets and not a platform-specific method of sending mail.
ie, it can be used on *nix and Win32.
C:\> perldoc -q "send mail"
...might help you as well.
> 2) What or who is Fasthosts and what is Activestate Perl compared to =
> perl?
You could easily answer this question yourself without having to wait
for us:
http://www.google.com/search?q=fasthosts
ActiveState Perl (aka ActivePerl) is to perl as a Ford Taurus is to a
car. (ie, it's just one implementation of Perl; ActivePerl has a mostly
good reputation in the industry.)
http://www.activestate.com/Products/ActivePerl/
> 3) What is Blat?
http://gepasi.dbs.aber.ac.uk/softw/Blat.html
[ snip ]
[ snipped HTML ]
Please don't post in HTML, and especially not text _and_ HTML.
HTH
Tim
--
Life *is* pain, Highness. Anyone who
says differently is selling something.
-- Westley, "The Princess Bride"
------------------------------
Date: Sun, 4 Nov 2001 00:00:10 -0800
From: "Dynamo" <robin1@otenet.gr>
Subject: Re: Newbie help please with free perl form scripts
Message-Id: <9s1pm502s9u@enews3.newsguy.com>
Hi Tim
Sorry but its been a long day. Should have known better than to post in NG
using HTML (first apology) and you were correct in that I could have found
out faster about FastHosts and blat using search engines without wasting the
groups time (second apology). However, what threw me was that my webserver
(net2.co.uk) who host my site were informing me about fasthost. I mistakenly
assumed therefore that fasthost was some technology that I needed to get my
form to work rather than being another webserver!! Are net2 saying to me
that they don't want my business?
All the same thanks for your response but just one last query. Being a total
newbie (el thicko) what do I do with the C:\> perldoc -q "send mail" that
you mention and how will it help me?
Kind Regards
Paul Robinson
Tim Hammerquist <tim@vegeta.ath.cx> wrote in message
news:slrn9u8mkn.vh6.tim@vegeta.ath.cx...
> Me parece que Dynamo <robin1@otenet.gr> dijo:
> > I asked my ISP for the location of my sendmail prog and got the =
> > following reply:
> > =20
> > net2 uses Windows 2000 servers so the above information is not
relevant. =
> > PERL was originally a UNIX language and although it runs fine on NT, =
> > there are some changes that are needed.
>
> Interesting phrasing. Why did they tell you about perl when you asked
> about sendmail?
>
> > For ASP, we have the mailing components JMail and CDONTS. We also =
> > support the AdRotator and have Persit's ASP Upload. Fasthosts have the
=
> > full version of Active State v5.6 Perl installed but have no other =
> > modules installed for it. Blat is also installed on all servers.
>
> When I asked an ISP admin to install an ASP component, between ASPMail
> (~$50) and ASPEMail ($0), he chose ASPEmail and we had no problems.
> Perl OTOH needs no ASP components to send email.
>
> > This being the case, how can I configure formmail.pl to work on my =
> > server? (Yes I know that formmail.pl is not considered to be one of the
=
> > best but I have got thus far and this is all a good learning =
> > experience). I have configured the pl file to my host name, recipients
=
> > to my email address etc etc. but have left the $sendmail variable at
the =
> > default cos now I don't know what to put there. My form seems to work =
> > fine and I get confirmation message saying that info has been sent but
I =
> > do not recieve the email.
>
> All in all, blat is probably the closest to sendmail that your ISP has.
> You may just want to modify your script to use blat.exe instead. Of
> course, I've never used blat, preferring perl, so don't take my word for
> it. ;)
>
> > It might be off topic for this NG and if so I apologise but since I am
a =
> > total newbie I don't know where else to go cos my ISP offers no support
=
> > for CGI or perl scripts and as such have the following questions:
> >
> > 1) Can I use formmail.pl on my site and if so what do I need to do to =
> > get it to work? If not can somebody please direct me to a free perl
form =
> > script that will work on WIN 2000 NT=20
>
> I have no experience with formmail.pl (but it sounds like an old
> script), but you may have to modify/replace it for it to work on WinNT
> (which has no standard "sendmail" program). When I was in a very
> similar situation, I used Jenda Krynicky's Mail::Sender module
> < http://jenda.krynicky.cz/#Mail::Sender > for the following reasons:
> 1. It's pure perl (doesn't require compilation) and doesn't need to
> be installed by the admin.
> 2. Uses sockets and not a platform-specific method of sending mail.
> ie, it can be used on *nix and Win32.
>
> C:\> perldoc -q "send mail"
>
> ...might help you as well.
>
> > 2) What or who is Fasthosts and what is Activestate Perl compared to =
> > perl?
>
> You could easily answer this question yourself without having to wait
> for us:
>
> http://www.google.com/search?q=fasthosts
>
> ActiveState Perl (aka ActivePerl) is to perl as a Ford Taurus is to a
> car. (ie, it's just one implementation of Perl; ActivePerl has a mostly
> good reputation in the industry.)
>
> http://www.activestate.com/Products/ActivePerl/
>
> > 3) What is Blat?
>
> http://gepasi.dbs.aber.ac.uk/softw/Blat.html
>
> [ snip ]
>
> [ snipped HTML ]
>
> Please don't post in HTML, and especially not text _and_ HTML.
>
> HTH
> Tim
> --
> Life *is* pain, Highness. Anyone who
> says differently is selling something.
> -- Westley, "The Princess Bride"
------------------------------
Date: Sat, 03 Nov 2001 15:33:15 GMT
From: "David K. Wall" <darkon@one.net>
Subject: Re: Perl on Windows2000
Message-Id: <Xns914E6BA025352darkononenet@24.2.68.108>
"Joseph J. Whalen" <joe.whalen@broadbeam.com> wrote:
> I am interested in running Perl on Windows 2000 in order to support
> perl CGI scripts through IIS. I have a copy of ActivePerl installed on
> the system. In all of the FAQ's that I've seen, it is recommended to
> also use cgi2shell.exe. I can not seem to find this utility anywhere
> for download.
That's because AFAIK it's not necessary. I'd never heard of it before
reading your post, and I've ran Perl programs as CGI on IIS 3, 4, and 5.
(And no, I did not put perl.exe in cgi-bin, which even old FAQs should tell
you is a horrible idea)
I did a web search for cgi2shell, and all I found were old documents dating
from 1996 or 1997. I suspect cgi2shell was a workaround for the
inadequacies of early versions of IIS. :-)
> My questions:
>
> 1. Is there someplace this can be downloaded from? If so, where.
> 2. Are there any other utilities I can use to replace the functionality
> cgi2shell provides?
> 3. Is there another way to get perl CGI's working under IIS other than
> the path that I've taken.
Sure. Read the ActivesPerl FAQ (Web Server Config), and search for Perl in
the IIS docs. I don't recall the details (but it's not hard), and in any
case it's not a Perl question, it's a web server configuration question.
IIRC you just associate Perl programs with perl.exe or PerlIS.dll. Check
the docs for details.
--
David Wall - darkon@one.net
"When the end of the world comes, I want to be in Cincinnati. Everything
happens ten years later there." -- Mark Twain
------------------------------
Date: Sat, 03 Nov 2001 22:02:47 +0100
From: "Carsten Menke" <bootsy52@gmx.net>
Subject: Re: reading flat-file db and replacing a word
Message-Id: <pan.2001.11.03.22.02.39.950.1740@gmx.net>
On Sat, 03 Nov 2001 11:16:42 +0100, Stuart Gall wrote:
> Or you can design your data structure with a delete flag so that to make
> a line bigger you overwrite the start with XXXXX or whatever then stick
> the new longer data at the end. Then do a garbage collection at the
> weekend.
>
> You can make a copy in memory or in another file.
>
I have made some thoughts, and, well I can hear all people say use a DB
then, but this is only what I thought of:
I have my file, for every line in the file I use a fixed line length
like:
ab1000;5;1011002;some comments, here#########################
#############################################################
dd500;6;1011115;some comments, here##########################
then for input, the # character is forbidden, because it is used as a
seperator. When replace an entry I do a:
open (FILE, "+< file.dat")
or die "Could not open File $!\n";
while(<FILE>)
{
if ($_=~m/^($expression)#+$/)
{
$pos = tell(FILE);
$size = length $1;
}
}
$pos -= $size;
seek(FILE, $pos, 0);
$fill = $fixed_size - $size;
$fill = '#'x$fill;
$replace .= $fill;
print FILE $replace
close(FILE);
If I want to delete a line I just simply fill it with # until it reached
the fixed line length. Every delete is counted and the result is stored in
separate file. If I want to add a line, I search for a line beginning
with # and fill the line up with the string to add.
Every day or weekend I look up the separate file where the delete and add
operations are counted, and if the amount of delete's reaches more than
20% of the add's for example a cron job is rewriting the file without the
empty ##### lines.
What do you think of that? Will this be possible solution or did I
overlook something important?
Carsten
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 2059
***************************************