[9932] in Perl-Users-Digest
Perl-Users Digest, Issue: 3525 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 24 14:03:15 1998
Date: Mon, 24 Aug 98 11:00:32 -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 Mon, 24 Aug 1998 Volume: 8 Number: 3525
Today's topics:
Re: [Q] getting ?name=value data from a URL through CGI (brian d foy)
better way to truncate string after certain number of " <shahada@icky.pc.my.NOSPAM>
Re: better way to truncate string after certain number (Sean McAfee)
Re: better way to truncate string after certain number (Matt Knecht)
Re: better way to truncate string after certain number <jdporter@min.net>
Re: COBOL and Perl (Bob Wolfe)
Re: COBOL and Perl huntersean@hotmail.com
Re: COBOL Historical Stuff <donald@willmack.com>
Re: Counting dots in a string (Larry Rosler)
Detecting Socket Close (Christopher M. DiPierro)
Encoding corrupts history list. <dan.albertsson@swipnet.se>
Re: Error Installing Perl on Digital UnixD <Christopher.Marquis@fairchildsemi.com>
Re: Forwarding mail spool file <murrayb@vansel.alcatel.com>
Re: Getting the 500 series error in IIS 4.0 charettec@my-dejanews.com
Re: Help with pattern matching... <danboo@negia.net>
How to select from mutliple tables in Oracle-DBI <gwang@dallas.geoquest.slb.com>
logical negation (David McLaurin)
Re: logical negation (Larry Rosler)
Looking for Perl modules for NetWare <seitz@bzs.tu-graz.ac.at>
Re: Looking for Programmer/Job Opp. (brian d foy)
Re: Need a cgi-programmer for business partnership (SRemaily)
Re: Nested regexp <Christopher.Marquis@fairchildsemi.com>
Passing variables from a ASP script to a PERL script <greg@cosmic.com.au>
Re: Pattern match for filename extensions <rcook@stnc.com>
Re: Pattern match for filename extensions <danboo@negia.net>
Re: Perl Bots! [Chatterbots, FAQbots, InfoBots] <leon@netcraft.com>
Re: Prime numbers [was Re: here's an implementation of (M.J.T. Guy)
Re: Recommend a good editor (Abigail)
Which perl for win32 (Windows NT)? (Milt Epstein)
Re: Writing a moduleless Web client <leon@netcraft.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 24 Aug 1998 13:37:23 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: [Q] getting ?name=value data from a URL through CGI.pm
Message-Id: <comdog-ya02408000R2408981337230001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6rq15l$h90@bobo.shirenet.com>, crusader@bobo.shirenet.com (Scott Cherkofsky) posted:
>I've been using CGI.PM with great success to grab submitted form data from
>an HTML page. I've recently started trying to get data directly from a
>URL in the form:
>
>http://www.somesite.com/somepage.htm?Var1=Val1&Var2=Val2
>
>For some reason, I can't get the name,value pairs to show up in my PERL
>script using the same method that works for submitted (POSTed) forms:
>
>use CGI qw(:standard);
>$query = new CGI (\*STDIN);
what happens if you change that to
$query = new CGI;
?
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Conference Quiz Show <URL:http://tpj.com/tpj/quiz-show>
------------------------------
Date: Mon, 24 Aug 1998 23:56:21 +0800
From: shahada abubakar <shahada@icky.pc.my.NOSPAM>
Subject: better way to truncate string after certain number of "."
Message-Id: <35E18D25.D7664601@icky.pc.my.NOSPAM>
I'm looking for an efficient way to do this... given a newsgroup name
and a "depth" integer, truncate the newsgroup name after "depth" number
of periods. For example,
&truncname ('comp.lang.perl.announce', 1) eq 'comp.';
&truncname ('comp.lang.perl.announce', 2) eq 'comp.lang.';
&truncname ('comp.lang.perl.announce', 3) eq 'comp.lang.perl.';
&truncname ('comp.lang.perl.announce', 4) eq
'comp.lang.perl.announce';
&truncname ('comp.lang.perl.announce', 5) eq
'comp.lang.perl.announce';
Any ideas?
Regards,
.sha
------------------------------
Date: Mon, 24 Aug 1998 16:19:17 GMT
From: mcafee@seawolf.rs.itd.umich.edu (Sean McAfee)
Subject: Re: better way to truncate string after certain number of "."
Message-Id: <9ogE1.1884$QT4.9234728@newbabylon.rs.itd.umich.edu>
In article <35E18D25.D7664601@icky.pc.my.NOSPAM>,
shahada abubakar <shahada@icky.pc.my.NOSPAM> wrote:
>I'm looking for an efficient way to do this... given a newsgroup name
>and a "depth" integer, truncate the newsgroup name after "depth" number
>of periods. For example,
> &truncname ('comp.lang.perl.announce', 1) eq 'comp.';
> &truncname ('comp.lang.perl.announce', 2) eq 'comp.lang.';
> &truncname ('comp.lang.perl.announce', 3) eq 'comp.lang.perl.';
> &truncname ('comp.lang.perl.announce', 4) eq
>'comp.lang.perl.announce';
> &truncname ('comp.lang.perl.announce', 5) eq
>'comp.lang.perl.announce';
>Any ideas?
Yep:
sub truncname {
my ($str, $n) = @_;
$str =~ s/((?:.*?\.){$n}).*/$1/;
$str;
}
...or just use the regular expression directly.
--
Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
| K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
| tv+ b++ DI++ D+ G e++>++++ h- r y+>++** | umich.edu
------------------------------
Date: Mon, 24 Aug 1998 17:31:57 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: better way to truncate string after certain number of "."
Message-Id: <hshE1.631$pY1.3647144@news2.voicenet.com>
Sean McAfee <mcafee@seawolf.rs.itd.umich.edu> wrote:
>In article <35E18D25.D7664601@icky.pc.my.NOSPAM>,
>shahada abubakar <shahada@icky.pc.my.NOSPAM> wrote:
>>I'm looking for an efficient way to do this... given a newsgroup name
>>and a "depth" integer, truncate the newsgroup name after "depth" number
>>of periods. For example,
>
>sub truncname {
> my ($str, $n) = @_;
> $str =~ s/((?:.*?\.){$n}).*/$1/;
> $str;
>}
I use the same approach, but I also cache what I've seen (Since when I
need to do this I'm usually looking at hundreds of thousands of lines of
data). I'd suggest:
(I have this written as a closure. For simplicities sake, I'll use a
global here.)
### UNTESTED
my @seen = ();
sub truncname (\@$)
{
my ($group, $level) = @_;
die "$0: sub truncname: Non-numeric level '$level'\n"
unless $level =~ /^\d+$/;
$level++;
# Don't care about auto-vivification of $seen[$level]
return $seen[$level]->{$group} if exists $seen[$level]->{$group};
($seen[$level]->{$group}) = ($group =~ s/((?:.*?\.){$n}).*/$1/);
return $seen[$level]->{$group};
}
I also save out the the @seen array to a file, so the next time I run
the program it's faster. Unfortunately, I haven't benchmarked this
method against anything else. I'm running on the (hopefully correct)
guess that this way is faster.
I've also thought about using a more ordered hash to store multi level
hierarchies instead of just a single hash that is keyed by something
like: $seen[2]->{comp.lang.perl.misc} = 'comp.lang';
Into a structure like:
$seen{'comp.lang.perl.misc'}->[2] = 'comp.lang';
Or even:
$seen{comp}->{lang}->{perl}->{misc};
This last method really appeals to me because of the way you can work
with distinct hierarchies (But, I don't need that level of control yet,
so I haven't done it that way :) ).
At some point I may actually try these methods and benchmark them all to
see which one wins (Although, any cache should be faster, and more
memory intensive than just running the name through a regex everything
you see it).
--
Matt Knecht - <hex@voicenet.com>
------------------------------
Date: Mon, 24 Aug 1998 14:03:22 -0400
From: John Porter <jdporter@min.net>
Subject: Re: better way to truncate string after certain number of "."
Message-Id: <35E1AAEA.4278@min.net>
Matt Knecht wrote:
>
> I use the same approach, but I also cache what I've seen (Since when I
> need to do this I'm usually looking at hundreds of thousands of lines of
> data). I'd suggest:
>...
Or just use Mark-Jason's excellent Memoize module.
--
John Porter
------------------------------
Date: Mon, 24 Aug 1998 16:05:48 GMT
From: rtwolfe@flexus.com (Bob Wolfe)
Subject: Re: COBOL and Perl
Message-Id: <35e18eb7.9387107@news.enter.net>
Thomas Jespersen <thomas@demeter.daimi.aau.dk> wrote:
>Charles F Hankel <charles@hankel.mersinet.co.uk> writes:
>
>
>> So the myth lives on, does it?
>>
>> The largest number of systems affected by the y2k scenario are
>> relatively modern systems. The problem is being more assiduously
>
>Please check if you newsreader got an option to send the same message
>4 times, and turn it off.
Thomas:
I only got Charles' message once (each). There were indeed 2
messages, but each was unique. To me, this indicates that:
1. perhaps you didn't read his reply and assumed that there were
duplicates, or
2. perhaps the problem lies with your ISP/DNS, etc.
Bob Wolfe, flexus, rtwolfe at spammers-are-meat-heads flexus dot com
To reply, look at my e-mail address, get rid of the spammer insult and fix the address.
Check out The Flexus COBOL Page at http://www.flexus.com
------------------------------
Date: Mon, 24 Aug 1998 16:29:33 GMT
From: huntersean@hotmail.com
Subject: Re: COBOL and Perl
Message-Id: <6rs4dd$3ft$1@nnrp1.dejanews.com>
In article <35E16365.CF280FEC@hankel.mersinet.co.uk>,
prog@hankel.mersinet.co.uk wrote:
> huntersean@hotmail.com wrote:
> >
> > In article <6rldhj$na5@lotho.delphi.com>,
> > paulr@bix.com (paulr) wrote:
> >
> > > On the other paw,
> > > I sure wouldn't use COBOL for a text scanning or SGML
> > > application. <grin>
> >
> > Neither would I. I wouldn't use COBOL for anything else, either. Neither
do
> > the company I work for, nor any of the major banks here in London AFAIK.
>
> I think you should reconsider that last statement. A large number of
> the major banks use COBOL extensively in their systems, in my direct
> experience.
>
<HUMBLEPIE>
I apologise for my ill-advised remarks about banks and COBOL. A quick search
shows me that many do use COBOL. Consider my statement reconsidered 8^).
</HUMBLEPIE>
I still wouldn't use it, though. (That's just a statement of personal
preference)
> I have comparatively little experience of Perl but it seems to me that
> Perl relies extensively on additional libraries to gain any level of
> effectiveness, rather than just the pure language itself. It is also
Not true. Most of what you probably consider to be "additional libraries" are
the perl modules that part of the standard distribution of the language. This
is analogous to the different header files which are included when writing a
program in C, and the different libraries needed to link a C program.
> interpretive, which is not necessarily a desirable thing in a production
> environment.
>
A language being interpreted can be very useful in a production environment
in my experience. Managers do not always agree, though. It has to be said,
though that speed of execution is not always a prime consideration, and ease
of programming and maintainence is often more critical, especially because of
the high rates charged by us contractors ;->.
> True, you may think that it's jolly good but it really doesn't match
> COBOL in some areas. I work on mainframe systems (you know, the ones
> that do a lot of boring work) and in this environment, COBOL is probably
> the leading language as such.
I work in back-office, and our entire bank runs on large Solaris servers under
unix. Our systems do a lot of boring work using C++ and perl.
> We use utility software such as Selcopy
> and Easytrieve for the more mundane tasks such as data extraction and
> reporting.
>
Perl (in spite of it's acronym) is an excellent general-purpose language. I
use it for far more than just data extraction and reporting.
> It would seem to me, so far, that Perl does little more than Selcopy can
> do and, as such, I'm not particularly impressed. One reason for lack of
> impression is that Selcopy is simply an easy-to-use tool and yet Perl is
> touted as a language.
> So what makes Perl a language and Selcopy a utility? I would guess that
The US govt definition of "programming language" (taken from FS-1037C) is "An
artificial language that is used to generate or to express computer programs.
Note: The language may be a high-level language, an assembly language, or a
machine language."
"language" is defined as: "A set of characters, conventions, and rules that is
used for conveying information."
Perl is quite obviously a language in the same way COBOL, C, BASIC, et al
are. It's pretty silly to dispute this. It's not _touted_ as anything. I
don't know Selcopy. Perhaps its a language too.
> it's the environments and the different ways that we view things. Or
> could it be that Perl is promoted as a language, while Selcopy is sold
> as a "multiple information retrieval" utility? As far as I can tell,
> though, there is little difference between the two in functional terms
> other than the documentation. My Selcopy manual has 242 concise pages
You don't seem able to tell very far. Perl is a language in which it is
possible to write tools that retrieve and report on information. It's also
possible to write unix networking/IPC programs, games, shell utilities,
daemons, libraries for use in other languages, interpreters for other
languages, and any pretty much anything else in perl. In functional terms
that's very different from a "multiple information retrieval" utility.
> and is easy to use; my Perl 5 book has 938 verbose pages, and finding
> useful things can take a while when wading through the dross.
>
> You are wrong to slag off COBOL. It is neither better nor worse than
> Perl, and it is an argument that you will never win; the contextual
> arguments will see to that.
I'm just saying I wouldn't use COBOL for any programming if I had the option
of perl or C++. Ever.
Regards
Sean Hunter
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 24 Aug 1998 12:02:44 -0400
From: "Donald Tees" <donald@willmack.com>
Subject: Re: COBOL Historical Stuff
Message-Id: <6rs274$h33$1@news.igs.net>
>Informally, she was probably "Grace".
Informally (to her students of which I was one), she was
"Amazin Grace".
------------------------------
Date: Mon, 24 Aug 1998 10:04:04 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Counting dots in a string
Message-Id: <MPG.104b3cdc82ce18e198976e@nntp.hpl.hp.com>
In article <35E18828.A6409E13@icky.pc.my.NOSPAM> on Mon, 24 Aug 1998
23:35:04 +0800, shahada abubakar <shahada@icky.pc.my.NOSPAM> says...
> I'm looking for an efficient way to count the number of ocurrences of a
> particular character in a string. For example:
>
> &countch ('comp.lang.perl.announce', '.') == 3
> &countch ('comp.unix.admin', '.') == 2
> &countch ('alt.romance','.') == 1
>
> Is there a better way to implement this other than a for loop over the
> length of the string, and a substr to test and increment a counter?
There is a ('much' x $many) better way. Look in perlop for the 'tr'
operator.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 24 Aug 1998 16:29:44 GMT
From: cdipierr@wam.umd.edu (Christopher M. DiPierro)
Subject: Detecting Socket Close
Message-Id: <6rs4do$rj5@dailyplanet.wam.umd.edu>
I am writing a small perl client that is designed to test some HTTP/1.1
features. A problem I have is with persistent connections. I can easily
make a socket connection, send a request, receive a response and close a
connection. However, if I want to send another request on that same socket
(HTTP/1.1 or 1.0 /w Keep-Alive allows this) I need to see if the server
closed the socket. What's the best way to do this?
------------------------------
Date: 24 Aug 98 17:15:01 GMT
From: "Dan Albertsson" <dan.albertsson@swipnet.se>
Subject: Encoding corrupts history list.
Message-Id: <01bdcf82$d1a6a760$5701a8c0@dan>
I use the input tag to send a file to the webserver and there take care of
it with perl.
<INPUT type="file" name="filLocalName" size="35">
But It seems that when setting the encoding to "multipart/form-data",
Netscape
Navigator 3.0 and 4.0 gets it's history list corrupted after I submit the
form. When I press "Back" in the browser page it shows the same page again.
And when pressing "Back" again it shows the page previous the one I want to
go to.
<FORM METHOD=POST ENCTYPE="multipart/form-data">
It works fine in IE 3.0 and 4.0.
Is it possible to manipulate the header I send back to the browser or use
another encoding to solve the problem.
/dan
------------------------------
Date: Mon, 24 Aug 1998 12:42:47 -0400
From: Christopher Marquis <Christopher.Marquis@fairchildsemi.com>
Subject: Re: Error Installing Perl on Digital UnixD
Message-Id: <35E19807.B3E0E718@fairchildsemi.com>
Sounds like you need to install the good ol' tried and true GNU C compiler. I
am running HP-UX v10.x and it comes with a compiler that doesn't work
properly. I had to get a licsenced compiler from hp. Sun does the same deal
with Solaris, after SunOS they stopped shipping cc bundled with the OS. Not
that I know anything about DEC Unix but sounds like a similar situation...
cc -c -Ae -O +Onolimit -DVERSION=\"0.93\" -DXS_VERSION=\"0.93\" +z
-I/opt/perl5/lib/PA-RISC1.1/5.00404/CORE DBI.c
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C
product; ignored.
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C
product; ignored.
(Bundled) cc: warning 480: The +Onolimit option is available only with the
C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +z option is available only with the C/ANSI C
product; ignored.
Issam W. Alameh wrote:
> I Tried to install perl on DU 4.od, but it is keep giving this error,
> Use which C compiler? [cc]
>
> Checking for GNU cc in disguise and/or its version number...
> Configure: DEC: not found
>
> *** WHOA THERE!!! ***
> Your C compiler "cc" doesn't seem to be working!
> You'd better start hunting for one and let me know about it.
>
> I am not benefiting from my machine since it is meant to be used as a web
> server and run on it perl, can any body help in this
>
> Regards
> Issam Alameh
------------------------------
Date: 24 Aug 1998 09:45:52 -0700
From: Brad Murray <murrayb@vansel.alcatel.com>
Subject: Re: Forwarding mail spool file
Message-Id: <u1zq6xr9b.fsf@vansel.alcatel.com>
tyuhas@neurobio.arizona.edu writes:
> Also, anyone know offhand what's the official message separator for a
> sendmail spool file?
/^From /
--
Brad Murray "It may be that your sole purpose in life is
Software Analyst simply to serve as a warning to others."
Alcatel Canada --Anonymous
------------------------------
Date: Mon, 24 Aug 1998 16:57:11 GMT
From: charettec@my-dejanews.com
Subject: Re: Getting the 500 series error in IIS 4.0
Message-Id: <6rs616$5iv$1@nnrp1.dejanews.com>
Hello Ken,
- I am using GNU Perl 5 for Win32. I had downloaded the cgi.pm (and
subsequently renamed it cgi.cgi) module separately and have it placed in the
same directory as perl.exe and my script.
- I used Windows NT Explorer | View | Options to change the file association.
I don't know where to make the changes in the Registry.
- I made sure that the Execute checkbox was enabled.
Regards,
Chris
In article <6rkfbe$r5f@top.mitre.org>,
"Ken Jones" <kgjones@mitre.org> wrote:
> Chris-
> Couple of ideas.
>
> What version of Perl are you running? Some versions (ActiveState, for
> example) do not include the CGI.pm module in the build. You have to go to
> MIT's Genome Database Project webpage or to the page associated with Larry
> Stein's new book on CGI.pm. If needed I can dig up the specific URLs.
>
> When you say you associated .cgi with Perl.exe, was that done in the
> Registry or through the options in Windows NT Explorer? If not in the
> Registry, you'll have to do a script mapping so that the web server process
> knows what to do with a .cgi file. I can give you the details on this also.
>
> Last thing is in the IIS 4.0 Administration Snap-In. Have you granted
> script or execute access to the directory? Also recommend that you separate
> readable files (.html/.htm, etc) from executable files for security reasons.
>
> Ken
>
> >I'm having a problem running CGI scripts properly. We are running a web
> server
> >from IIS 4.0, part of BackOffice for Small Business. I have my CGI scripts
> >located in the \INETPUB\SCRIPTS directory with Everyone Full Control. I
> >associated .CGI with PERL.EXE and they are located in the same directory.
> The
> >library file CGI has the extension .CGI. The script I am trying to run is:
> >
> > # CGI script using CGI.pm module.
>
> >
> >I have tried renaming files, putting them in different locations and the
> >like. And I verified that IIS 4.0 had the directory listed in the WWW
> >settings. Does anyone have any ideas?
> >
> >Thanks,
> >Chris
>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 24 Aug 1998 12:50:52 -0400
From: Dan Boorstein <danboo@negia.net>
Subject: Re: Help with pattern matching...
Message-Id: <35E199EC.62CE4CC@negia.net>
huntersean@hotmail.com wrote:
>
> In article <6rpn6o$g7i$1@nnrp1.dejanews.com>,
> kevin@zippy.tnet.com wrote:
> > Looking for a bit of help...
> >
> > I've got strings coming at me like:
> >
> > /usr/archives/muttusr/1998-08/000024: @436{54} changing...
> > xxxxxxxxxxxxxx^^^^^^^x^^^^^^^x^^^^^^xxx^^^x^^xxx...
> >
> > The above ^^^ areas are significant to me. However the beginning of
> > the line could change where it might look like:
> >
[snip]
>
> Assuming that the stuff is in $_, the following will work for the cases you've
> mentioned:
>
> ($list, $archive, $article, $position, $length) =
> m|.*/(.*?)/(.*?)/(.*?): @(.*?)\((.*)\).*|;
^^ ^^
uhh, no it won't. i believe you need to change your escaped parens
to curly brackets. it's also slower than either of the responses
posted thus far, which is perhaps of little importance to the
original poster.
cheers,
--
Dan Boorstein home: danboo@negia.net work: danboo@y-dna.com
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
- Cosmic AC
------------------------------
Date: Mon, 24 Aug 1998 10:42:27 -0500
From: Gill Ge Wang <gwang@dallas.geoquest.slb.com>
Subject: How to select from mutliple tables in Oracle-DBI
Message-Id: <35E189E3.3CFC7DFD@dallas.geoquest.slb.com>
--------------416D8518A45E31AABB1FA5E8
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi, Experters:
I am trying to select variables from mutliple tables in Oracle-DBI and
failed. What I want is the following query:
select table1.variable1, table2.variable2 from table1, table2 where
table1.variable3=table2.variable3
$sth = $dbh->prepare("select table1.variable1, table2.variable2 from
table1, table2 where table1.variable3=table2.variable3") or die;
Could someone help me to develop the correct syntax in Oracle-DBI?
Thank you very much!
Regards!
Gill
--------------416D8518A45E31AABB1FA5E8
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
Hi, Experters:
<P>I am trying to select variables from mutliple tables in Oracle-DBI and
failed. What I want is the following query:
<P>select table1.variable1, table2.variable2 from table1, table2 where
table1.variable3=table2.variable3
<P><B>$sth = $dbh->prepare("select table1.variable1, table2.variable2
from table1, table2 where table1.variable3=table2.variable3") or die;</B>
<BR><B></B>
<P>Could someone help me to develop the correct syntax in Oracle-DBI?
Thank you very much!
<P>Regards!
<P>Gill
<PRE></PRE>
</HTML>
--------------416D8518A45E31AABB1FA5E8--
------------------------------
Date: 24 Aug 1998 16:44:17 GMT
From: david.mclaurin@analog.com (David McLaurin)
Subject: logical negation
Message-Id: <6rs591$eja@nwd2nws1.analog.com>
When using the ! operator, if the operand evaluates to be non-zero,
should nothing be returned? i.e., command DB<35> below generates only a newline:
DB<34> print !(0)
1
DB<35> print !(1)
The behavior that I would expect is for a "0" to be returned. Is there a logical
not operator that will return a "1" when the operand is "0" and a "0" when the
operand is "1"?
- David McLaurin
------------------------------
Date: Mon, 24 Aug 1998 10:46:17 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: logical negation
Message-Id: <MPG.104b46c39e537eeb98976f@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <6rs591$eja@nwd2nws1.analog.com> on 24 Aug 1998 16:44:17 GMT,
David McLaurin <david.mclaurin@analog.com> says...
>
> When using the ! operator, if the operand evaluates to be non-zero,
> should nothing be returned? i.e., command DB<35> below generates only a newline:
...
> The behavior that I would expect is for a "0" to be returned. Is there a logical
> not operator that will return a "1" when the operand is "0" and a "0" when the
> operand is "1"?
0 + !$x
--
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 24 Aug 1998 16:25:11 GMT
From: "Peter Seitz" <seitz@bzs.tu-graz.ac.at>
Subject: Looking for Perl modules for NetWare
Message-Id: <01bdcf7b$c4a3ad30$0ec61b81@fvwzspc04>
Dear perl friends,
on CPAN at category 4) Operating System Interfaces, there are some NetWare
Modules listed which are maintained by kthomas. These modules should give
access to netware specific functions, e.g getting information from the
bindery or the NDS.
But I could not find these modules on CPAN.
Does anybody know more about these modules or maybe someone is using these
modules. Or are these modules payware?
Any thoughts?
--
Peter
http://wwwbzs.tu-graz.ac.at/~seitz/
------------------------------
Date: Mon, 24 Aug 1998 13:33:24 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Looking for Programmer/Job Opp.
Message-Id: <comdog-ya02408000R2408981333240001@news.panix.com>
Keywords: from just another new york perl hacker
In article <1998082404112600.AAA25340@ladder01.news.aol.com>, fixinghole@aol.com (FixingHole) posted:
>Free subdomain script, in where the users page is loaded in the bottom frame,
>in the top frame, an advertisement is loaded and traked, easy new user sign up,
>and a cheat proof interface so that they cannot bust out of the frame...
forget the cheat proof frame idea ;)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Conference Quiz Show <URL:http://tpj.com/tpj/quiz-show>
------------------------------
Date: 24 Aug 1998 16:46:50 GMT
From: sremaily@aol.com (SRemaily)
Subject: Re: Need a cgi-programmer for business partnership
Message-Id: <1998082416465000.MAA15584@ladder01.news.aol.com>
Response to this post has been tremendous, but the position has been filled.
Thanks for your interest :)
Santee
------------------------------
Date: Mon, 24 Aug 1998 12:30:13 -0400
From: Christopher Marquis <Christopher.Marquis@fairchildsemi.com>
Subject: Re: Nested regexp
Message-Id: <35E19514.589210B4@fairchildsemi.com>
Great book! One of the best books I have ever read... Nowhere else have I found
such in depth information on regexp.
Ken McNamara wrote:
> For anyone struggling with Regexp - check out "Mastering Regular Expressions"
> from O'Reilly by Friedl.
------------------------------
Date: Tue, 25 Aug 1998 01:10:29 +0800
From: "Greg Meechan" <greg@cosmic.com.au>
Subject: Passing variables from a ASP script to a PERL script
Message-Id: <6rs6q1$gr$1@yeppa.connect.com.au>
G'day,
I've got a great PERL search engine and a great ASP database manipulator.
I want to place the search criteria that someone types into a database.
I can get the search form to pass the info to the asp file and place the
search criteria into the database.
The asp file also makes the variables returned from the search form into
session variables.
The question is:
How can I get a PERL script to pickup the session variables created by the
asp? Or is there a better way to do this??
Any comments appreciated!
Cheers
Greg
--
~~~~~~~~~~~~~~~~~~~~
Greg Meechan
Cosmic Web Designs
greg@cosmic.com.au
http://www.cosmic.com.au
~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Mon, 24 Aug 1998 17:28:57 +0100
From: "Ryan Cook" <rcook@stnc.com>
Subject: Re: Pattern match for filename extensions
Message-Id: <346B48D4AE18D11181FB00609762664D6055C8@atlantis.stnc.co.uk>
Thanks everyone for the solutions!
Now can anyone tell me how to do a regex which will match a pattern at the
end of a string. What I really need to know is how to use Assertions,
particularly \Z which "..matches at the end of the string."
(Larry Wall's "Programming Perl" 2nd edition Page 62; I'm reading it as I
type this stuff in...).
Again, Your help greatly appreciated, in advance!!!
Thanks, Ryan
rcook@stnc.com
------------------------------
Date: Mon, 24 Aug 1998 13:03:16 -0400
From: Dan Boorstein <danboo@negia.net>
Subject: Re: Pattern match for filename extensions
Message-Id: <35E19CD4.90E7D5DE@negia.net>
huntersean@hotmail.com wrote:
>
> In article <346B48D4AE18D11181FB00609762664D600DF4@atlantis.stnc.co.uk>,
> "Ryan Cook" <rcook@stnc.com> wrote:
> > I am trying to work out a pattern match expression to recognise a range of
> > filename extensions given filenames that are passed into the variable
> > $File::Find::name from a
> >
> > find(\&wanted, $directory);
> >
> > function call. The pattern match will reside inside the
> > "wanted{ }" subroutine and needs to be able to simuultaneously match a range
> > of filename extensions stored in an array such as:
> >
> > @ftypes = (".txt", ".exe", ".doc", ".pl", ".bat");
> >
[SNIP]
> If the list of filenames is going to change, you probably want something that
> will build your regex on the fly, like the following:
>
> @ftypes = qw(.txt .exe .doc .pl .bat);
>
> #quote the metachars in @ftypes
> @quoted_types = map {quotemeta $_} @ftypes;
>
> #build the regex
> for (@quoted_types) {
> $regex .= $_ . "|"
> }
> chop $regex;
what's wrong with:
$regex = join '|', map {quotemeta $_} @ftypes;
in particular it is the concatenation followed by the chop that bothers
me.
> $regex = "(?:".$regex.")";
>
> For the list above $regex will finish as '(?:\.txt|\.exe|\.doc|\.pl|\.bat)'
yes, and it will work, but why the (?:) noise? isn't:
/(?:\.txt|\.exe|\.doc|\.pl|\.bat)/
equivalent to:
/\.txt|\.exe|\.doc|\.pl|\.bat/
and finally, as YAL Rosler has already suggested, perhaps this is a
job for a hash instead.
cheers,
--
Dan Boorstein home: danboo@negia.net work: danboo@y-dna.com
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
- Cosmic AC
------------------------------
Date: Mon, 24 Aug 1998 18:02:40 +0100
From: Leon Brocard <leon@netcraft.com>
Subject: Re: Perl Bots! [Chatterbots, FAQbots, InfoBots]
Message-Id: <35E19CB0.2B721531@netcraft.com>
Harry McGreggor wrote:
> I was wondering if anyone out there would like to share some perl
> source code (related to bots, e.g infobots, faqbots, chatterbots etc)
Yup, well, gimme a sec to test it out.
> How difficult would it be for a Chatterbot to broaden it's knowledge
> on a subject by pooling the resources of other databases? (such as
> search engines, searchable FAQ's, databases, etc)
260 lines of perl codes gives you, tada-tada-tada:
<URL:http://www.astray.com/dabot.cgi>.
It's a bot that extracts things from a database, and if that fails,
falls back to Chatbot::Eliza to provide stimulating conversation.
It used to be an ircbot on slashnet, but is now CGI because
I can.
The backend database is mysql and the queries it accepts are fairly
simple, such as "what is a hacker", "search for bit". It will also
do "random", "spell freind", and "man time", because I was bored.
Code snippet to show that I wanna share code:
if ($message =~ m/^(what|who|where) (is|are) ?(a|the)? (.+?)\??$/i) {
return show($4);
}
Eeek. Now don't critise the code. Remember, TIMTOWTDI.
Why, what exactly do you have in mind?
Leon, who thoroughly enjoyed the Perl Conf...
--
Leon Brocard...............................................Perl Hacker
leon@netcraft.com.............................http://www.netcraft.com/
... Will the sound of one hand clapping still turn off my TV?
------------------------------
Date: 24 Aug 1998 17:31:01 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Prime numbers [was Re: here's an implementation of diff in perl]
Message-Id: <6rs80l$fc$1@pegasus.csx.cam.ac.uk>
Craig Berry <cberry@cinenet.net> wrote:
>
>The only way to detect prime-ness is to divide by all potential factors
>and get a remainder on each.
False. All modern (and even some quite ancient) methods use quite
different approaches to determine primality or to factorise.
Most methods depend on analysing the structure of the multiplicative
group mod N, and in particular determining whether it is cyclic.
Other methods study other associated groups, such as the group of points
on some elliptic curve.
Mike Guy
------------------------------
Date: 24 Aug 1998 16:00:14 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Recommend a good editor
Message-Id: <6rs2me$m5f$1@client3.news.psi.net>
Brian Inglis (Brian.dot.Inglis@CADvision.com) wrote on MDCCCXIX September
MCMXCIII in <URL: news:35e00b2b.149685269@news.cadvision.com>:
++ On 14 Aug 1998 23:57:35 GMT, abigail@fnx.com (Abigail) wrote:
++ >Steve Bohler (skbohler@sprynet.com) wrote on MDCCCIX September MCMXCIII
++ >in <URL: news:6r1qlj$90f@sjx-ixn1.ix.netcom.com>:
++ >Abigail
++ What's with the 1809 September 1993 in the header X-date
I replied by email, because nowhere in the message it indicated that
a copy was posted as well. But the message bounced, because your are
unable to configure your email such that reply addresses are valid.
You are 2 reasons why it's still September 1993.
Abigail
--
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")\n-> define ("foldoc", "perl")) [0] -> print'
------------------------------
Date: 24 Aug 1998 17:27:18 GMT
From: mepstein@staff.uiuc.edu (Milt Epstein)
Subject: Which perl for win32 (Windows NT)?
Message-Id: <6rs7pm$g2s$1@vixen.cso.uiuc.edu>
OK, I've read what FAQs I could find, and I've checked out a bunch of
previous threads at dejanews, but I'm still confused.
I'm trying to determine which version of perl to install on my Windows
NT machine. I want to get just the binaries, and not compile it
myself. As far as I can tell, there are three choices: the "Standard"
distribution (which is perl 5.004), ActiveState (perl 5.005), or a
version available from Cygnus, meant to work with their gnu-win32
stuff (currently perl 5.004, although they talk about an upcoming perl
5.005 version).
I gather there are some differences between these versions with regard
to module compatibility, and possibly also with regard to which
underlying UNIX-type package is used (although I'm not sure whether
it's required to use such a package at all). There were some things
about a possible lack of "fork()", for example.
I also saw something about a "merge" of versions, but I couldn't
determine the details and/or implications of that. It sounds like the
Standard and ActiveState versions have been merged, and that starting
with perl 5.005, ActiveState will be the "official" version.
(Although if there are complications with using modules, I wouldn't be
averse to using the Standard perl 5.004 version.)
Here are some comments about my intended usage:
I do plan to use one of the UNIX-type packages, likely either Cygnus'
gnu-win32 or AT&T's UWIN. At this point, I don't have any preference
for one of the other.
I plan to use perl for CGI.
I'm not heavily into module usage, but I will use some (e.g. libwww),
and of course it will be nice if there aren't any complications if I
want to use some module I find that looks interesting/useful.
Thanks for your help.
--
Milt Epstein
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu
------------------------------
Date: Mon, 24 Aug 1998 18:06:57 +0100
From: Leon Brocard <leon@netcraft.com>
Subject: Re: Writing a moduleless Web client
Message-Id: <35E19DB1.27422D11@netcraft.com>
Simon Wistow wrote:
> I'm trying to write a script that will grab a web page off a server
>
> So far it'll connect to port 80 and print the "GET / HTTP/1.0\n\n"
> request but then when I say something like
>
> $a=<S>; # ignore the fact that there will
> be more than one line coming through
> print "done\n";
>
> it never prints done.
>
> Why so?
Hmm. Dunno. But anyway, you *should* be using LWP::Simple. For eg:
use LWP::Simple;
my $content = get("http://www.astray.com/");
Simple, eh? And cross-platform (*nix, *doze, Macs..). And will work
in the future too. If there's one thing the Perl Conference kept
on repeating is "don't reinvent the wheel". Use CPAN. CPAN is your
friend.
Oh, and while you're at it, be a *kind* robot. See LWP::RobotUA
and WWW:RobotRules...
CPAN is now also accessible from http://www.cpan.org/ in case
your memory is failing.
Glad to be of help ;-)
Leon.
--
Leon Brocard...............................................Perl Hacker
leon@netcraft.com.............................http://www.netcraft.com/
... I used to be schizophrenic, but we're all right now.
------------------------------
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 3525
**************************************