[13436] in Perl-Users-Digest
Perl-Users Digest, Issue: 846 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep 19 06:07:16 1999
Date: Sun, 19 Sep 1999 03:05:11 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <937735511-v9-i846@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sun, 19 Sep 1999 Volume: 9 Number: 846
Today's topics:
Re: CGI Hosting? (ItsMe9905)
CGI script for remote server <byuan@eee.hku.hk>
Re: CRAP Software <gellyfish@gellyfish.com>
Re: CRAP Software (Abigail)
creating passwd file <jgentryNOxnSPAM@swcp.com>
Re: creating passwd file (Abigail)
Re: freq count on log files? <gellyfish@gellyfish.com>
Help me please <frenzyr@writeme.com>
Re: Help me please (Sam Holden)
Re: Help me please (Abigail)
Re: Help! (writing cgi/pearl/sendmail program) raynew@my-deja.com
How to chown and chmod KernelKlink@webtv.net
Re: How to chown and chmod <gellyfish@gellyfish.com>
Re: How to chown and chmod (Abigail)
Re: How to create files from CGI script? <davids@desertigloo.com>
Re: Locking a tied database with DB_File <gellyfish@gellyfish.com>
Re: Locking a tied database with DB_File <admin@gatewaysolutions.net>
ODBC: Creating a System DSN with perl (AcCeSsDeNiEd)
Re: Perl Challenge (Abigail)
Re: Perl Module for MS Access? <aircooled@netlinq.net>
Programmer Needed <webmaster@danum.com>
Re: redirection problems (ItsMe9905)
Re: Search Engine <mattking@techie.com>
Re: slip dialer in perl? <gellyfish@gellyfish.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 19 Sep 1999 06:41:18 GMT
From: itsme9905@aol.comnojunk (ItsMe9905)
Subject: Re: CGI Hosting?
Message-Id: <19990919024118.01890.00001871@ng-fy1.aol.com>
Check out free.prohosting.com
Pros:
15MB space, cgi-hosting, ftp account, and no MANDATORY banners, pop-ups, or
text links
Cons:
No telnet, no sendmail, no email account, no FP extensions, ftp connections are
limited to 20 users at any given time.
------------------------------
Date: Sun, 19 Sep 1999 14:29:34 +0800
From: byuan <byuan@eee.hku.hk>
Subject: CGI script for remote server
Message-Id: <37E482CE.C7DD8808@eee.hku.hk>
Dear Sir:
How to build a remote server?
I want remote users to use my Fortran/C application in the web server,
they can submit
the input file by my homepage, and my CGI script
receive this input file, execute the Fortran application program, and
then output the result
to the users.
Can you send me some CGI script as a example?
Thank you very much for your help.
Yuan Bin "
------------------------------
Date: 19 Sep 1999 06:28:05 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: CRAP Software
Message-Id: <7s1vpl$is$1@gellyfish.btinternet.com>
On 19 Sep 1999 00:57:55 GMT lt lindley wrote:
>
> a slightly irrational
> loathing of George Reese,
Oh no you said it now - he'll be back ...
> Hell, I'm not even sure most of them (us?)
> like each other much.
>
Actually compared to most large disparate groups of people the regulars
in this group are (IMO) relatively likeable - mind that could say more
about me than the others though ..
>
> Double entendres are encouraged.
>
'A young woman walks into a bar and asks the barman for a double entendre
so he gave her one'
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 19 Sep 1999 02:26:05 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: CRAP Software
Message-Id: <slrn7u945a.2ml.abigail@alexandra.delanet.com>
Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCCX September
MCMXCIII in <URL:news:7s1vpl$is$1@gellyfish.btinternet.com>:
[] On 19 Sep 1999 00:57:55 GMT lt lindley wrote:
[] >
[] > a slightly irrational
[] > loathing of George Reese,
[]
[] Oh no you said it now - he'll be back ...
George is a Kiboist?
Abigail
--
Perhaps it's time for an alt.fan.george-reese.
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sat, 18 Sep 1999 23:04:42 +1700
From: Josh Gentry <jgentryNOxnSPAM@swcp.com>
Subject: creating passwd file
Message-Id: <03000ec8.358463ae@usw-ex0103-020.remarq.com>
Folks,
I want to write a Perl script that will take a text file
containing info about users and output a passwd file. I'm
going to use a system call to use "useradd." What I was
thinking is that I could use while <textfile>, read in a
line of info seperated by a delimiter. What I don't know
how to do is assign the seperated strings to a variable.
For instance, first line in file is
Josh /nfs/dos/home pppuser
and assign to variables so that
$UserName=Josh
$Home=/nfs/dos/home
$Group=pppuser
and then I can use useradd
system ("useradd $UserName -d $Home/$UserName");
How do I do the assigning of variables?
Josh
jgentry@swcp.com
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: 19 Sep 1999 02:27:24 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: creating passwd file
Message-Id: <slrn7u947p.2ml.abigail@alexandra.delanet.com>
Josh Gentry (jgentryNOxnSPAM@swcp.com) wrote on MMCCIX September MCMXCIII
in <URL:news:03000ec8.358463ae@usw-ex0103-020.remarq.com>:
~~
~~ I want to write a Perl script that will take a text file
~~ containing info about users and output a passwd file. I'm
~~ going to use a system call to use "useradd." What I was
~~ thinking is that I could use while <textfile>, read in a
~~ line of info seperated by a delimiter. What I don't know
~~ how to do is assign the seperated strings to a variable.
split(), with a list containing lvalues on the LHS.
Abigail
--
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 19 Sep 1999 06:48:43 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: freq count on log files?
Message-Id: <7s210b$mm$1@gellyfish.btinternet.com>
On Sun, 19 Sep 1999 02:18:55 GMT donturn@fis.utoronto.ca wrote:
> Hi, I'm trying to write a quickie server log analyzer to just count the
> frequencies of IP addresses in the log file. I'd like to write to a file
> that lists the Ip address and then the total for each IP.
>
> Anyone know of something to help do this?
>
Er, Perl ?
It really does depend on your logfile of course - just for fun however
here is something I made earlier - the data is from my web server log -
of course you will probably want to open your own file yourself :
#!/usr/bin/perl -w
use strict;
my %hosts;
while(<DATA>)
{
if(m/^(\d+\.\d+\.\d+\.\d+)\s # IP Number of client
(\S*)\s(\S*)\s # User ?
\[(.+?):(.+?)\s([+-]\d+)\]\s # Date Time TZ Offset
"([^"]*)"\s # Request
(\d{3})\s # Status
(\d*)\s+ # Size of data xfered
"(\S+)"\s+ # referrer
"(.*)" # User agent
/x
)
{
$hosts{$1}++;
}
}
foreach (keys %hosts)
{
print $_ ,"\t",$hosts{$_},"\n";
}
__END__
128.250.6.197 - - [13/Sep/1999:00:29:05 +0100] "GET / HTTP/1.0" 200 3310 "-" "Mozilla/3.01Gold (Macintosh; I; 68K)"
128.250.6.197 - - [13/Sep/1999:00:29:12 +0100] "GET /graphics/welcome.gif HTTP/1.0" 200 5262 "-" "Mozilla/3.01Gold (Macintosh; I; 68K)"
128.250.6.197 - - [13/Sep/1999:00:29:15 +0100] "GET /graphics/gellys.gif HTTP/1.0" 200 8777 "-" "Mozilla/3.01Gold (Macintosh; I; 68K)"
216.103.91.123 - - [13/Sep/1999:02:03:46 +0100] "GET /flames HTTP/1.0" 301 322 "-" "Mozilla/4.6 (Macintosh; I; PPC)"
216.103.91.123 - - [13/Sep/1999:02:03:46 +0100] "GET /flames/ HTTP/1.0" 200 7199 "-" "Mozilla/4.6 (Macintosh; I; PPC)"
24.28.198.123 - - [13/Sep/1999:04:55:44 +0100] "GET /flames HTTP/1.1" 301 334 "http://www.gellyfish.com/flames" "Mozilla/4.0 (compatible; MSIE 4.01; MSN 2.5; MSN 2.5; Windows 95)"
24.28.198.123 - - [13/Sep/1999:04:55:44 +0100] "GET /flames/ HTTP/1.1" 200 7199 "http://www.gellyfish.com/flames" "Mozilla/4.0 (compatible; MSIE 4.01; MSN 2.5; MSN 2.5; Windows 95)"
24.3.17.11 - - [13/Sep/1999:05:18:50 +0100] "GET /flames HTTP/1.1" 301 334 "http://www.gellyfish.com/flames" "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)"
24.3.17.11 - - [13/Sep/1999:05:18:51 +0100] "GET /flames/ HTTP/1.1" 200 7199 "http://www.gellyfish.com/flames" "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)"
133.1.96.250 - - [13/Sep/1999:05:37:05 +0100] "GET /flames HTTP/1.0" 301 322 "-" "Mozilla/4.08 [Vine-ja] (X11; I; Linux 2.0.36.RTL1.1 i586)"
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 19 Sep 1999 11:31:44 +0200
From: "Frenzyr" <frenzyr@writeme.com>
Subject: Help me please
Message-Id: <7s2agp$nc6$1@weber.a2000.nl>
hia all, i have a question, i have a script and can't figure out why it's
not working
the permissions are set to 755 so that should be ok.
the script is as follows: please help me out here.
#!/usr/local/bin/perl
$SENDMAIL="/usr/lib/sendmail -t";
$SUBJECT="Thank you";
$REPLYTO="info@blablabla.com;
read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
@pairs = split(/&/,$buffer);
foreach $pair(@pairs) {
($name,$value) = split(/=/,$pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
# split up the "to" names for multiple recipients
$TO=$FORM{'email'};
# Open Sendmail and do our thing
open (SENDMAIL,"| $SENDMAIL") || die "Ain't Gonna Happen";
print SENDMAIL "To: $TO\n";
print SENDMAIL "Subject: $SUBJECT\n";
print SENDMAIL "Reply-To: $REPLYTO\n";
print SENDMAIL "blablablabla\n";
close(SENDMAIL);
exit;
------------------------------
Date: 19 Sep 1999 09:49:25 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Help me please
Message-Id: <slrn7u9cd5.icb.sholden@pgrad.cs.usyd.edu.au>
On Sun, 19 Sep 1999 11:31:44 +0200, Frenzyr <frenzyr@writeme.com> wrote:
>hia all, i have a question, i have a script and can't figure out why it's
>not working
>
>the permissions are set to 755 so that should be ok.
>
>the script is as follows: please help me out here.
>
>#!/usr/local/bin/perl
No -w.
No -T on a CGI script.
No use strict.
Maybe you should do all those things first and start again.
>
>$SENDMAIL="/usr/lib/sendmail -t";
>
>$SUBJECT="Thank you";
>$REPLYTO="info@blablabla.com;
^ ^
You could try reading the error message that these would generate...
Of course you'll have to run it at the prompt not as a CGI...
>
>read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
There is this thing called CGI.pm which will do what you are trying to
do. The bonus is it will actually work.
>@pairs = split(/&/,$buffer);
>foreach $pair(@pairs) {
>($name,$value) = split(/=/,$pair);
> $value =~ tr/+/ /;
> $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
>$FORM{$name} = $value;
>}
>
># split up the "to" names for multiple recipients
>$TO=$FORM{'email'};
>
># Open Sendmail and do our thing
>open (SENDMAIL,"| $SENDMAIL") || die "Ain't Gonna Happen";
>print SENDMAIL "To: $TO\n";
>print SENDMAIL "Subject: $SUBJECT\n";
>print SENDMAIL "Reply-To: $REPLYTO\n";
>print SENDMAIL "blablablabla\n";
>close(SENDMAIL);
It might be good to seperate the headers from the body in the standard way.
Reading the standard or some mail documentation will tell you how...
--
Sam
Remember that the P in Perl stands for Practical. The P in Python
doesn't seem to stand for anything.
--Randal Schwartz in <8cemsabtef.fsf@gadget.cscaper.com>
------------------------------
Date: 19 Sep 1999 04:51:34 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Help me please
Message-Id: <slrn7u9cm2.2ml.abigail@alexandra.delanet.com>
Frenzyr (frenzyr@writeme.com) wrote on MMCCX September MCMXCIII in
<URL:news:7s2agp$nc6$1@weber.a2000.nl>:
() hia all, i have a question, i have a script and can't figure out why it's
() not working
()
() the permissions are set to 755 so that should be ok.
()
() the script is as follows: please help me out here.
()
() #!/usr/local/bin/perl
No -w
No -T
No use strict;
No use CGI;
() $SENDMAIL="/usr/lib/sendmail -t";
()
() $SUBJECT="Thank you";
() $REPLYTO="info@blablabla.com;
^ ^
| |
() read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
() @pairs = split(/&/,$buffer);
() foreach $pair(@pairs) {
() ($name,$value) = split(/=/,$pair);
() $value =~ tr/+/ /;
() $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
() $FORM{$name} = $value;
() }
You should be using the routines from CGI.pm for this.
As shown many times in this groups, the above is inadequate.
() # split up the "to" names for multiple recipients
() $TO=$FORM{'email'};
()
() # Open Sendmail and do our thing
() open (SENDMAIL,"| $SENDMAIL") || die "Ain't Gonna Happen";
() print SENDMAIL "To: $TO\n";
() print SENDMAIL "Subject: $SUBJECT\n";
() print SENDMAIL "Reply-To: $REPLYTO\n";
() print SENDMAIL "blablablabla\n";
() close(SENDMAIL);
And what if the close doesn't succeed?
You haven't said at all what you mean with "doesn't work".
Furthermore, you do your utter best not to have Perl tell you
what is wrong.
Always use -w. Always. No exception. Always use strict as well.
And only make an exception on that if you really know what you
are doing.
Abigail
--
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print
qq{Just Another Perl Hacker\n}}}}}}}}}' |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 19 Sep 1999 07:16:18 GMT
From: raynew@my-deja.com
Subject: Re: Help! (writing cgi/pearl/sendmail program)
Message-Id: <7s22ju$8q9$1@nnrp1.deja.com>
No spam.
I have three domains that are not hosted locally.
Cheap, but do not support smtp.
They advise me to use my local dialup isp.
My local dialup isp will not accept any email
(even via dialup modem) that does not have THEIR
domain name in return address.
I just want to send email with my domain name for return address.
I have found this problem with most of the low cost domain hosts.
I would guess this is a common problem.
Currently I keep looking for any isp in the world
that does not check return address.
They are drying up bit by bit because of spam.
Any OTHER suggestions?
Ray
In article <37E3C254.7B872310@prodigy.net>,
Ken Robbins <puyrebelNOSPAMTHANKS@prodigy.net> wrote:
> raynew@my-deja.com wrote:
> > [...]
> > BUT
> >
> > Reply-To:
> >
> > and
> >
> > From:
> >
> > change to myname@mydomain.com
> > [...]
>
> I don't know about anyone else, but doesn't that sound like he is
going
> to send spam?
>
> --
> Ken Robbins
> Remove NOSPAMTHANKS to reply by e-mail.
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 19 Sep 1999 00:52:10 -0400 (EDT)
From: KernelKlink@webtv.net
Subject: How to chown and chmod
Message-Id: <6857-37E46BFA-110@newsd-212.iap.bryant.webtv.net>
I have searched my perl books and altavista for the following but have
not found an answer.
I have a perl script (result.cgi) that creates a result.txt file. The
result.txt file automatically assumes the ownership of "nobody" with a
permission of 600 and susequently I cannot chown or chmod it with my FTP
program.
Is there anything that I can put at the end of my result.cgi that will
give me ownership of the result.txt that the script generates, and also
chmod it to 755?
------------------------------
Date: 19 Sep 1999 07:15:08 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to chown and chmod
Message-Id: <7s22hs$v2$1@gellyfish.btinternet.com>
On Sun, 19 Sep 1999 00:52:10 -0400 (EDT) KernelKlink@webtv.net wrote:
> I have searched my perl books and altavista for the following but have
> not found an answer.
>
> I have a perl script (result.cgi) that creates a result.txt file. The
> result.txt file automatically assumes the ownership of "nobody" with a
> permission of 600 and susequently I cannot chown or chmod it with my FTP
> program.
>
> Is there anything that I can put at the end of my result.cgi that will
> give me ownership of the result.txt that the script generates, and also
> chmod it to 755?
>
You obviously didnt look very hard as there is a Perl builtin chmod - however
an alternative might by to use umask instead so the file is created with
the correct permissions in the first place.
perldoc -f chmod
perldoc -f umask
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 19 Sep 1999 02:30:03 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: How to chown and chmod
Message-Id: <slrn7u94cn.2ml.abigail@alexandra.delanet.com>
KernelKlink@webtv.net (KernelKlink@webtv.net) wrote on MMCCX September
MCMXCIII in <URL:news:6857-37E46BFA-110@newsd-212.iap.bryant.webtv.net>:
{}
{} Is there anything that I can put at the end of my result.cgi that will
{} give me ownership of the result.txt that the script generates, and also
{} chmod it to 755?
No [1]. And yes. Why you cannot do the first is a question for a unix group.
How to do the latter is explained in the manual, in the section about chmod.
[1] Well, there are a few Unixen that allow that. Not everyone thinks
that's a good idea.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 19 Sep 1999 02:56:51 -0700
From: "David P. Schwartz" <davids@desertigloo.com>
Subject: Re: How to create files from CGI script?
Message-Id: <37E4B362.FE1AFE3C@desertigloo.com>
Thanks for the suggestion, Bob. What I forgot to add was that I created a subdir beneath
the one the scripts are in (inside cgi-bin) and it DOES have 666 perms. Still doesn't
work.
It seems to be getting overridden by either umask or the perms on cgi-bin (711).
again:
umask 022
/cgi-bin 711
/cgi-bin/code_dir1 711
/cgi-bin/code_dir1/mydatadir 666
A perl script, myscript.pl, residing in /cgi-bin/code_dir1 fails all the possible calls
to 'open' (and create) a non-existent file in mydatadir that I can think to do. The
sysadmins haven't been able to suggest anything yet either. Perms on myscript.pl have
even been set with +s, which doesn't make any difference.
Any other ideas?
Could I run a short ksh script that has +s perms set to do this??? If so, what system
call would I use?
-David
Bob Walton wrote:
> "David P. Schwartz" wrote:
> >
> ...
> > a new "school year", so to speak. So, I have been trying to get the Perl script to
> > create the needed files if they're not found. Unfortunately, any attempt to CREATE
> > a new file raises an "insufficient permissions" error and fails.
>
> David, most likely, your web server doesn't have write permission in
> the *directory* in which you are attempting to create your file.
> Give that directory world write permission, and it should work fine.
> Recognize the security risk involved if that directory is your cgi-bin
> directory. You should probably make a directory for your data off
> by its lonesome somewhere, containing just your data.
>
------------------------------
Date: 19 Sep 1999 07:22:30 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Locking a tied database with DB_File
Message-Id: <7s22vm$ve$1@gellyfish.btinternet.com>
On Sat, 18 Sep 1999 16:35:45 -0500 Scott Beck wrote:
>
> &lock_db("$db");
You dont want to do that
Or this :
> &unlock_db("$db");
Lose those unnecessary quotes around the variables there and you'll be
alright.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 19 Sep 1999 03:18:04 -0500
From: "Scott Beck" <admin@gatewaysolutions.net>
Subject: Re: Locking a tied database with DB_File
Message-Id: <ru96t4j6lg772@corp.supernews.com>
Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:7s22vm$ve$1@gellyfish.btinternet.com...
> On Sat, 18 Sep 1999 16:35:45 -0500 Scott Beck wrote:
> >
> > &lock_db("$db");
>
> You dont want to do that
>
> Or this :
>
> > &unlock_db("$db");
>
This is probably too abvious to you but what difference does it make?
I mean double quotes interpolates as it would with no
quotes.
Is is more efficient without them?
If so why?
> Lose those unnecessary quotes around the variables there and you'll be
> alright.
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
Thanks.
--
Scott Beck
------------------------------
Date: Sun, 19 Sep 1999 08:36:51 GMT
From: dillon_rm@magix.com.sg (AcCeSsDeNiEd)
Subject: ODBC: Creating a System DSN with perl
Message-Id: <37e49dd4.6733510@news.magix.com.sg>
How in the world do I create a System DSN with the ODBC.pm?
I only know how to create a user dsn. The code goes something like
this:
Win32::ODBC::ConfigDSN(ODBC_ADD_DSN,
$DriverType,
("DSN=$DSN",
$Description,
"DBQ=$dir\\$DataBase",
"DEFAULTDIR=$dir",
"UID=user", "PWD=password"))
I don't find any thing about creating system dsn in the ODBC.pm docs.
Thanks.
To e-mail me, remove "_rm"
------------------------------
Date: 19 Sep 1999 03:02:45 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl Challenge
Message-Id: <slrn7u96a1.2ml.abigail@alexandra.delanet.com>
Sam Holden (sholden@pgrad.cs.usyd.edu.au) wrote on MMCCX September
MCMXCIII in <URL:news:slrn7u8r7e.at3.sholden@pgrad.cs.usyd.edu.au>:
;; On Sat, 18 Sep 1999 11:38:40 GMT, makau@multimania.com wrote:
;; >I challenge you to tell me what this piece of cde does :-)
;; >
;; >$text=~s/('|")/${{"'"=>"\\'",'"'=>'\\"'}}{$1}/eg;
;; >
;; >I doubt you'll find out easily :)
;;
;; You call that a challenge...???
Well, the challenge could be how to do it with way less chars. ;-)
$text =~ s/['"]/\\$&/g;
Or if you don't want to use $&:
$text =~ s/(['"])/\\$1/g;
Or without s///:
$text = join "\\" => split /(?=['"])/ => $text;
Or in a for loop:
$text =~ s/$_/\\$_/g for qw `' "`;
And if you really want to use /eg:
s[['"]]{sub {"\\".shift} -> ($&)}eg;
Abigail
--
tie $" => A; $, = " "; $\ = "\n"; @a = ("") x 2; print map {"@a"} 1 .. 4;
sub A::TIESCALAR {bless \my $A => A} # Yet Another silly JAPH by Abigail
sub A::FETCH {@q = qw /Just Another Perl Hacker/ unless @q; shift @q}
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 19 Sep 1999 02:25:12 -0600
From: "Gregger" <aircooled@netlinq.net>
Subject: Re: Perl Module for MS Access?
Message-Id: <37e49da0_3@news5.newsfeeds.com>
Okay, now that this can-o-worms is open....
i need to get a web form to post a couple of fields to a file (csv,
whatever), and considered Access briefly; reconsidered, but am still without
a solution. Web forms are not a big deal, i know...however, i am being
hindered thusly:
1. "mailto:" is NOT an option.
2. getting our IT dept. to allow us cgi/perl permissions is not likely.
3. getting our IT dept. to set up a DSN on a server (to use ASP-->Access)
is laughably impossible.
4. I still need to get it done.
If anyone who knows web better than me (i.e., anyone) could tell me the
incredibly simple solution to this, i'd be forever indebted....
Jonathan Stowe wrote in message <7s05gb$1n7$1@gellyfish.btinternet.com>...
>In comp.lang.perl.misc jdkronicz@my-deja.com wrote:
>> Hi. I am relatively new to Perl and I am looking to use
>> it to develope a website with an Access Database. I know
<snip>
>There are many reasons why you dont want to use MS Access in a real live
<snip>
>However that said you will need to use one of DBD::ODBC (preferred if you
>are going to change to a proper database later) or Win32::ODBC both of
>these modules are abailable from the activestate repository using PPM.
<snip>
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 19 Sep 1999 10:42:44 +0100
From: Danum Web <webmaster@danum.com>
Subject: Programmer Needed
Message-Id: <37E4B013.C0F931B5@danum.com>
Experienced programmer URGENTLY needed for several projects.
Must have experience of all of the following:
Perl, Mod Perl, C++, MySQL, Java, HTTP Sockets.
You would be required to maintain, monitor and improve our server
performance (Linux server).
Please email me with details of experience, sample of work and telephone
number.
Wayne
------------------------------
Date: 19 Sep 1999 07:01:11 GMT
From: itsme9905@aol.comnojunk (ItsMe9905)
Subject: Re: redirection problems
Message-Id: <19990919030111.01890.00001876@ng-fy1.aol.com>
Nico,
I've been down this road before...
In my case, I wanted to the reader from the "thank you" page back to my home
page. My solution? I used the META http-equiv="refresh" tag.
For example, within the script that creates the thank you page:
print <<EndHTML;
<html>
<head>
<meta http-equiv="refresh" content="3;url=../index.htm;">
<title>Thanks!</title>
</head>
<body>
<h1>Thanks for signing my guestbook.</h1><p><p>
Your comment is most appreciated.<p>
<a href="../index.htm">Return to my home page</a>
</body></html>
EndHTML
;
------------------------------
Date: Sun, 19 Sep 1999 07:43:06 +0200
From: "Matt King" <mattking@techie.com>
Subject: Re: Search Engine
Message-Id: <7s1r0k$4pk$1@news.uk.ibm.com>
Take a look at http://www.worldwidemart.com/scripts/ grab 'simple search'
(no Ididn't write it). If your using something other then *nix, then will
need to get the *nix to Win32 conversion program called ls.exe, you will
then need to make the modifications to match your site. After that.........
Works great (but a bit slow) on a Windowz system.
Matt
Pawan Bhati <pawanbhati@hotmail.com> wrote in message
news:7s1v8e$1ks$1@news.vsnl.net.in...
>
> Can anyone please help me build a small search engine for my site in perl.
> My website is on Webjump & I have tried many free search scripts but all
> fail to work.
> Somebady pleaze help me !!
>
> Pawan
> pawanbhati@hotmail.com
>
>
>
------------------------------
Date: 19 Sep 1999 06:52:23 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: slip dialer in perl?
Message-Id: <7s2177$mu$1@gellyfish.btinternet.com>
On 18 Sep 1999 21:12:50 GMT fheitka@ibm.net wrote:
> I was wondering if anyone has written a dialer
> script to connect to an ISP (dynamic) using
> say perl and slattach?
>
No mine uses 'chat' and 'pppd' sorry.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 846
*************************************