[12024] in Perl-Users-Digest
Perl-Users Digest, Issue: 5624 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 11 06:07:15 1999
Date: Tue, 11 May 99 03:00:17 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 11 May 1999 Volume: 8 Number: 5624
Today's topics:
A short example for using WIN32::ODBC and EXCEL sebhenkel@my-dejanews.com
Any good CGI script for searching files in personal web (Austin Ming)
Re: Any good CGI script for searching files in personal <fabascal@gredos.cnb.uam.es>
CONTRACT PERL PROGRAMMER (Adam Fishman)
Databse connectivity (PREETI KUMAR)
Re: email attachment <david@icon.screaming.net>
Re: File::Find non-functional when passing arguments to (Ilya Zakharevich)
From Oracle to Sybase in Perl <lasteyrie@iname.com>
Re: Generate matching strings from regex ? (Bart Lateur)
Re: how to setup cgi <gellyfish@gellyfish.com>
Link -> auto generated page <andreas73@my-dejanews.com>
Re: need a perl/cgi tutorial please <c4jgurney@my-dejanews.com>
Need help with Perl/C++ interface cathalgallagher@my-dejanews.com
Re: Offline Mode CTRL-D Problem (brian d foy)
search engine! <sriramsr@adcc.alcatel.be>
Re: Sorting is too slow for finding top N keys... - BEN (Michel Dalle)
Universal interface <pkotala@logis.cz>
Re: why won't this cgi script work? <gellyfish@gellyfish.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 11 May 1999 07:58:08 GMT
From: sebhenkel@my-dejanews.com
Subject: A short example for using WIN32::ODBC and EXCEL
Message-Id: <7h8nuf$if4$1@nnrp1.deja.com>
Hi,
can anybody give me a short example on how to perform a search for a
word or value in an Excel-spreadsheet using the WIN32::ODBC module?
I am able to connect to my ODBC source, but somehow I am at a loss on
how to search in an excel spreadsheet for a value or a word. I have to
admit, that I am a total beginner regarding the use of SQL and ODBC.
Best regards,
Sebastian
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 11 May 1999 08:57:15 GMT
From: austin95002887@yahoo.com (Austin Ming)
Subject: Any good CGI script for searching files in personal web site ?
Message-Id: <7h8rdb$d28$2@justice.csc.cuhk.edu.hk>
Any good CGI script for searching files in personal web site ?
------------------------------
Date: Tue, 11 May 1999 11:46:41 +0200
From: Federico Abascal <fabascal@gredos.cnb.uam.es>
To: Austin Ming <austin95002887@yahoo.com>
Subject: Re: Any good CGI script for searching files in personal web site ?
Message-Id: <3737FC80.31D11E5B@gredos.cnb.uam.es>
Austin Ming wrote:
> Any good CGI script for searching files in personal web site ?
I don't have it, but a easy and fast way you can do it could be calling
system commands. For example, in an unix system:
find /path -type f -name $arg_from_web -print ... Or what you want. Then
read the output of find and send it formatted.
Here I have the code of a function to get the parameters from the web
(it works with "POST" and "GET"):
sub getData {
my($temp, @pairs, $key, $content, %fields, $item);
if($ENV{'REQUEST_METHOD'} eq 'POST') {
read(STDIN, $temp, $ENV{'CONTENT_LENGTH'});
} else {
$temp=$ENV{'QUERY_STRING'};
}
@pairs=split(/&/,$temp);
foreach $item (@pairs) {
($key,$content)=split (/=/,$item,2);
$content=~tr/+/ /;
$content=~ s/%(..)/pack("c",hex($1))/ge;
$fields{$key}=$content;
}
return \%fields;
}
Fede
------------------------------
Date: Tue, 11 May 1999 01:19:55 -0700
From: adam@fci.net (Adam Fishman)
Subject: CONTRACT PERL PROGRAMMER
Message-Id: <adam-1105990119550001@kingfish.fishbone.com>
CONTRACT PERL PROGRAMMER
A Commercial Internet Commerce Service Provider providing Internet
E-Commerce Websites for companies around the country is accepting
applications for the position of CONTRACT PERL PROGRAMMER. Applicants must
be self-motivated, talented and have at least 3 years experience in
computer programming.
Programming experience in C/Unix, CGI scripting, SHELL, AWK, SED and PERL.
Duties will include documentation, programming, and debugging. Flexible
hours. Part-Time.
Please send a resume and samples of programming work to:
FCI.NET
1462 W. 8th Ave.
Eugene, OR 97402
FAX: 541-345-1257
OR
EMAIL jobs@fci.net
Experience/Skills:
* CGI scripting (Perl/C)
* Software Debugging
* BSDi UNIX, Linux, FreeBSD or Sun operating systems
* system backups/maintenance scripts
* ability to troubleshoot and solve problems creatively
* self-motivated with a positive attitude
* Reliable at completing projects in a timely manner
Not Required, But Helpful:
* UNIX system administration
* UNIX security
* database programming/SQL
------------------------------
Date: Mon, 10 May 1999 22:42:59 -0800
From: preetikumar@rocketmail.com (PREETI KUMAR)
Subject: Databse connectivity
Message-Id: <YiQZ2.3782$me.1600637@WReNphoon4>
I want to get ingo from browsers thru a form which needs to be stored in a
database. How do I do it ?
Help!
**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
------------------------------
Date: Tue, 11 May 1999 09:34:57 +0100
From: "David Craig" <david@icon.screaming.net>
Subject: Re: email attachment
Message-Id: <b2SZ2.509$T3.1393@newsr2.u-net.net>
>
>Er. If you are using a recent ActiveState Perl then you will be able to
>use PPM to install it which is by far the best thing to do ...
>
Hmm, I'm not sure what ActiveState Perl is. Sorry, I am learning Perl at
the moment! I installed Perl version 5.003 (Win32). I am trying to write a
program to run on a UNIX webserver. presumably if I can get the module, I
can simply put it in my scripts directory on the webserver? I've had a look
at Lite.pm, and it is full of documentation - is the installation supposed
to strip out the documentation?
Thanks
David
------------------------------
Date: 11 May 1999 06:27:26 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: File::Find non-functional when passing arguments to &wanted
Message-Id: <7h8ike$msq$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to M.J.T. Guy
<mjtg@cus.cam.ac.uk>],
who wrote in article <7h7r3p$ph0$1@pegasus.csx.cam.ac.uk>:
> >You probably mean: use
> >
> > \do {my $foo = 15}
> >
> >instead... Not that pretty too...
>
> Of course not. What I meant was: use
>
> (15 =~ /(.*)/ && \$1)
$a = (15 =~ /(.*)/ && \$1);
"foo" =~ /((.)\2)/;
print $$a;
Ilya
------------------------------
Date: 11 May 1999 08:25:50 GMT
From: Laurent de LASTEYRIE <lasteyrie@iname.com>
Subject: From Oracle to Sybase in Perl
Message-Id: <7h8pie$8pk$1@news.x-echo.com>
I'm not really sure to be in the good newsgroups, but if anyone has an
idea about the good one, all suggest are welcome.
I found some examples of DBI using Oracle, but when i try with Sybase, i
t doesn't work.
Here is the script :
#!/usr/bin/perl
package Sybase::Sybperl;
use Carp;
require Exporter;
require AutoLoader;
use Sybase::DBlib;
$bcp = new Sybase::DBlib sa,;
my $sql = qq{SELECT id, name, title FROM zempl};
my $sth = $bcp->prepare($sql);
$sth->execute();
my($id, $name, $title);
$sth->bind_column(undef,\$id, \$name, \$title);
while ($sth->fetch()) {
print "$name, $title, $id\n";
}
$sth->finish();
If anyone can say what going wrong in this script, it will really help m
e...
Thank's for your answer
---------------------------------------
Laurent de Lasteyrie
lasteyrie@iname.com
http://www.ima.uco.fr/~hobbes
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Article poste via Voila News - http://www.news.voila.fr
Le : Tue May 11 10:25:50 1999 depuis l'IP : 193.49.1.61
------------------------------
Date: Tue, 11 May 1999 08:41:05 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Generate matching strings from regex ?
Message-Id: <3740ecb9.4025453@news.skynet.be>
Ronald J Kimball wrote:
>Bart Lateur <bart.lateur@skynet.be> wrote:
>
>> As a first side remark: you cannot do everything using regexes alone.
>> Nested submatches don't translate into regexes. You probably would need
>> a parser for that. Example of nested submatches:
>>
>> /(a(b*)c)/
>
>I must be missing something... That *is* a regular expression. So what
>do you mean when you say that nested submatches don't translate into
>regexes???
Of course it's a regex. My aim is to build an engine that can
translate any regex, like this one, into a more readable format.
The syntax of capturing parentheses is defined recursively. Nesting can
go to any depth. Hence, you need a parser.
I guess that all other features of regexes can be translated using
regexes, although sometimes pretty convoluted ones. For example,
recogizing ANY character class out of a (string containing a) regex, is
doable.
>And here's a grammar for it:
>
>S -> aBc
>B -> bB | <epsilon>
Nice. That looks like a set of regexes on the right hand side.
Now, how can you generate this set of rules from the regex? I bet that
you cannot do that conversion wit ha regulkar expression alone. You need
a recursive descent. That's why you need a parser.
Or, am *I* missing something?
Bart.
------------------------------
Date: 11 May 1999 09:05:49 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: how to setup cgi
Message-Id: <3737e4dd@newsread3.dircon.co.uk>
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> On Mon, 10 May 1999 20:30:31 +0100 Mark Twells wrote:
>>
>> Kent Perrier <kperrier@blkbox.com> wrote in message
>> news:ysiogk8vhq4.fsf@blkbox.com...
>>> mk@best.com (mk) writes:
>>>
>>> This is not a perl related question. The is a cgi/server configuration
>> related
>>> question.
>> Gee , thanks!
>>
>>
>>> comp.infosystems.www.authoring.cgi
>>> comp.infosystems.www.servers.*
>>
>> Some of us don't get those ngs...and are left with the same problem.
>>
>
> I cannot believe that Demon dont take groups in the comp.infosystems.*
> hierarchy. Out of some 40,000+ groups they dont take those, Hmm we'll
> see.
>
Just as I thought - this if from Demon's 'active' file :
comp.infosystems 0000001872 0000001839 y
comp.infosystems.announce 0000000000 0000000001 m
comp.infosystems.gis 0000007938 0000007625 y
comp.infosystems.gopher 0000000542 0000000527 y
comp.infosystems.harvest 0000000842 0000000821 y
comp.infosystems.hyperg 0000000757 0000000732 y
comp.infosystems.interpedia 0000000303 0000000293 y
comp.infosystems.intranet 0000002584 0000002494 y
comp.infosystems.kiosks 0000000489 0000000473 m
comp.infosystems.search 0000001886 0000001828 y
comp.infosystems.wais 0000000425 0000000412 y
comp.infosystems.www.advocacy 0000002984 0000002965 y
comp.infosystems.www.announce 0000002141 0000002052 m
comp.infosystems.www.authoring.cgi 0000012436 0000012068 m
comp.infosystems.www.authoring.html 0000065679 0000063641 y
comp.infosystems.www.authoring.images 0000003921 0000003842 y
comp.infosystems.www.authoring.misc 0000004619 0000004509 y
comp.infosystems.www.authoring.site-design 0000014927 0000014401 y
comp.infosystems.www.authoring.stylesheets 0000008325 0000007832 y
comp.infosystems.www.authoring.tools 0000002914 0000002800 y
comp.infosystems.www.browsers.mac 0000005476 0000005320 y
comp.infosystems.www.browsers.misc 0000005067 0000004978 y
comp.infosystems.www.browsers.ms-windows 0000013603 0000013381 y
comp.infosystems.www.browsers.x 0000002975 0000002928 y
comp.infosystems.www.databases 0000000401 0000000371 y
comp.infosystems.www.misc 0000003703 0000003633 y
comp.infosystems.www.servers.mac 0000001353 0000001316 y
comp.infosystems.www.servers.misc 0000002273 0000002191 y
comp.infosystems.www.servers.ms-windows 0000008282 0000008009 y
comp.infosystems.www.servers.unix 0000023527 0000022732 y
As I have pointed out before there is no point saying 'the Thing That is
not true' here ...
/J\
------------------------------
Date: Tue, 11 May 1999 06:43:07 GMT
From: Andreas <andreas73@my-dejanews.com>
Subject: Link -> auto generated page
Message-Id: <7h8jhp$eb3$1@nnrp1.deja.com>
Hi,
I4d like the visitors at my homepage to click on a link - which then
generates a page automatic with an image. Sort of thumbnail, without the
nails, just links. The page that is generated should the contain an
image that is related to the link. See what I mean?
Thanks,
Andreas
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Tue, 11 May 1999 07:41:04 GMT
From: Jeremy Gurney <c4jgurney@my-dejanews.com>
Subject: Re: need a perl/cgi tutorial please
Message-Id: <7h8mug$hp5$1@nnrp1.deja.com>
In article <7h89uu$9t1$1@news.iinet.net.au>,
"Rusty" <decarlo@telebot.com> wrote:
> Does anyone know of a site where I can get a good perl/cgi tutorial?
>
> Cheers
http://www.free-ed.net/fr03/lfc/course%20030207_01/index.html
I can't say I've gone throught the whole thing but the bits I looked at
looked OK.
Jeremy Gurney
SAS Programmer | Proteus Molecular Design Ltd.
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Tue, 11 May 1999 08:32:24 GMT
From: cathalgallagher@my-dejanews.com
Subject: Need help with Perl/C++ interface
Message-Id: <7h8pup$jm6$1@nnrp1.deja.com>
I am having a lot of problems trying to get Perl to Call C++ methods
using XS.
Note: I may have posted this yesterday but I can't see it amoung the
postings so apoloigies if its there.
Anyway I have tried both the samples in the XS man page and the panther
book.
Based on the panther book I have created a class car. I have compiled
its method sinto a library file. (tested this though a main. cc it works
ok.)
Now I have two have two available functions
Car* new_car();
void drive(Car *);
I changed the Makjefile.PL to have 'CC' => 'CC' (cplusuplus instead of
c) and 'LD' => 'CC'. Otherwise the compiler wouldn't recognise the class
type etc.
Then when my car.XS file gets parsed into a "c" file but the syntax is
the old type e.g
void sample (string)
char* string
{
}
Which the compiler doesn't like. I am using Solaris compiler 4.2.
Has anyone had similar problems. If not has anyone a simple interface
working so I can see what I'm doing wrong.
Basically I'm stumped so at present my "hacked" solution is to wrap the
C++ in C functions and call them from Perl.
Cathal
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Tue, 11 May 1999 03:36:35 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Offline Mode CTRL-D Problem
Message-Id: <brian-ya02408000R1105990336350001@news.panix.com>
In article <7h8adi$779$1@nnrp1.deja.com>, trw_sqrd@my-dejanews.com posted:
> I'm using perl 5.00402 on a windows '98 OS. The
> problem is when I go into offline mode to try to
> test my perl scripts, CTRL-D does not work to get
> out of the entering of the name-value pairs. Does
> anyone know what the key mapping is supposed to
> be, or is there a known problem with this?
does control-Z work for you? i think that's how that platform
does it...
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Tue, 11 May 1999 14:45:34 +0530
From: "S.R.SriRam" <sriramsr@adcc.alcatel.be>
Subject: search engine!
Message-Id: <3737F535.8687B94C@adcc.alcatel.be>
Hi,
I am trying to write a search engine for our intranet web server using
perl.
Any pointer/freeware/shareware info appreciated.
TIA
Sriram
------------------------------
Date: Tue, 11 May 1999 09:27:29 GMT
From: michel.dalle@sni.be (Michel Dalle)
Subject: Re: Sorting is too slow for finding top N keys... - BENCH
Message-Id: <7h8t4g$903$1@news.mch.sbs.de>
lr@hpl.hp.com (Larry Rosler) wrote:
>[snip]
>Michel,
>
>I am very confused. I decided to measure the simple sort, which you
>report takes xx minutes, and compare it with my latest algorithm. Here
>are the results (for two different ways of creating the hash keys:
>
>Benchmark: timing 1 iterations of External0, External1, Internal0,
>Internal1, Sort0, Sort1...
> External0: 4 wallclock secs ( 4.07 usr + 0.00 sys = 4.07 CPU)
> (warning: too few iterations for a reliable count)
> External1: 3 wallclock secs ( 2.63 usr + 0.00 sys = 2.63 CPU)
> (warning: too few iterations for a reliable count)
> Internal0: 3 wallclock secs ( 2.58 usr + 0.00 sys = 2.58 CPU)
> (warning: too few iterations for a reliable count)
> Internal1: 1 wallclock secs ( 1.32 usr + 0.00 sys = 1.32 CPU)
> (warning: too few iterations for a reliable count)
> Sort0: 1 wallclock secs ( 0.72 usr + 0.00 sys = 0.72 CPU)
> (warning: too few iterations for a reliable count)
> Sort1: 1 wallclock secs ( 0.88 usr + 0.00 sys = 0.88 CPU)
> (warning: too few iterations for a reliable count)
>
>Why does a sort that you report takes xx minutes take less than one
>second? This result casts the whole exercise in doubt. I need to
>understand it before I post anything more.
>
>Here is the code:
>[snip]
Don't tell me ! I was just trying to investigate this...
I have tried this on several systems :
1) home PC : Pentium 133 MHZ, 64 MB RAM
2) work PC : Pentium II 266 MHz, 128 MB RAM
3) Unix system : MIPS 4000 (?) - to be checked
Here is the rough timing for different Perl versions on the different
machines:
1) with 5.003_07 : several minutes
1) with 5.005_02 : 2 seconds
2) with 5.004_02 : 1 second
2) with 5.005_03 : < 1 second
3) with 5.004_03 : several minutes
3) with 5.005_02 : 1 second
So, I don't know what happened in the Perl code, but apparently 5.004_02
on PC is a lot faster that 5.004_03 on Unix, and 5.005_0x on all systems
is a lot faster too...
I knew there were reasons to upgrade to newer versions, but this difference
is really impressive, don't you think ?
This leaves us with a problem. I noticed a similar thread (with 100.000
entries in the hash) in october 1998. Maybe the size of the hash determines
when we reach some kind of bottleneck, and sorting suddenly becomes terribly
slow ?
(Note : using random values between 1 and 30.000 in the hash was already fast
on all old versions.)
The "reason for the exercise" was that simple sorting took much too long. Now,
when I compare 2.a. with 3.a., I feel that this bottleneck is still there, but
it has moved. The question is how to 'trigger' it.
Since I only have new versions of Perl everywhere now, I'll see if I can
reproduce the slow sorting phenomenon by increasing the size of the hash...
Michel.
------------------------------
Date: Tue, 11 May 1999 08:50:10 +0200
From: "Pavel Kotala" <pkotala@logis.cz>
Subject: Universal interface
Message-Id: <926405368.36842@gate.logis.cz>
We need to wirte some universal interface between several applications on
various platforms (PC-Win, DOS, UNIX) running on various DB
(X-BASE,text,ORACLE). Now we try to write some code in Perl.
I wold like to ask.
Is Perl secure platform (authorising-user and password,etc.)?
I like programming in Perl (multiplatform TCP/IP,DB by a few code). But is
decision to use Perl right? Or should we use any other language (eg. java-I
don4t know it-is programming multiplatform,multiDB so easy as in Perl?, On
the other hand, we would like to have some executable secure format, not a
script.).
Thank you
Pavel Kotala
------------------------------
Date: 11 May 1999 09:42:30 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: why won't this cgi script work?
Message-Id: <3737ed76@newsread3.dircon.co.uk>
Drew Simonis <Care227@ibm.net> wrote:
> Bart Lateur wrote:
>>
>> Drew Simonis wrote:
>>
>> >And, while I'm here, why are you reading a file into a scalar?
>>
>> Surely, the file contains just a number...
>>
> Then why read it into a filehandle?
>
>
You mean :
$count = <COUNT>;
There is nothing wrong with that - it reads one line of the file into
the scalar $count - if all the file contains is a single number then
there is no reason to do anything else.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 5624
**************************************