[7278] in Perl-Users-Digest
Perl-Users Digest, Issue: 903 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 22 05:07:16 1997
Date: Fri, 22 Aug 97 02:00:33 -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 Fri, 22 Aug 1997 Volume: 8 Number: 903
Today's topics:
anyone have a script for a membership area for NT? (JJ Kennedy)
Re: Archives and question <sfairey@adc.metrica.co.uk>
Re: CGI Error, any ideas? <darkstar@mail.janet.it>
Re: defined(<file>) bumps handle in perl5.004_1? (Mike Stok)
Re: defined(<file>) bumps handle in perl5.004_1? <dbenhur@egames.com>
delayed execution of a program?? <ldusadev@kestrok.com>
Re: Error 49 in SDBM store -- what does it mean? (Mike Heins)
Re: Field Length <ajiteshd@wiproge.med.ge.com>
Re: Help with CGI.pm Script (Roddy Knight)
How can I get rid of carriage return in textarea <info@arkson.com>
Re: How to Wrap long lines?? (Novice) <ajiteshd@wiproge.med.ge.com>
Re: if (/htm/ && !/html/) { (Mike Stok)
Re: naming arrays <ajiteshd@wiproge.med.ge.com>
NDBM problems - HELP! (Joachim Wunder)
Re: Need a routine to check for DATE (Daniel E. Macks)
Newbie 'exec' question <claude@macadamian.com>
Re: Newbie 'exec' question <dshoyt@worldnet.att.net>
Re: Novice scratches head <qball@ti.com>
Re: readig a file into an array <ajiteshd@wiproge.med.ge.com>
Reading in a file for use... <rrivers@co.broward.fl.us>
Re: Reading in a file for use... <sfairey@adc.metrica.co.uk>
Right shift (">>") in Perl 5.00401 <prt@Teleglobe.CA>
Re: Search Engine scripts ? (Anthony Boyd)
Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
Re: Statistics for comp.lang.perl.misc (Bart Lateur)
Re: TCL 8.0: A whole lot of perl (Brian Lewis)
Re: Unix text file problem (Andrew Beckett)
Win32::ODBC / String::Approx Problem <toddm@tngi.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 21 Aug 1997 22:36:46 -0400
From: oompa@loompa.com (JJ Kennedy)
Subject: anyone have a script for a membership area for NT?
Message-Id: <MPG.e66c545e3ec2ef2989693@nntp.ne.mediaone.net>
Hi all,
I'm looking for a script that will handel a membership area with username
and passwords that expire after a certain amount of time (e.g., 1 month,
3 month, 6 month, 1 year). Will be going on NT server, not UNIX.
Anyone have one handy?
Also looking for shopping cart setup.
Please reply to consultech@riconnect.com
Thanks
JJ
------------------------------
Date: Fri, 22 Aug 1997 09:39:25 +0100
From: Simon Fairey <sfairey@adc.metrica.co.uk>
To: jreisman@jacksonville.com
Subject: Re: Archives and question
Message-Id: <33FD503D.2781@adc.metrica.co.uk>
jreisman@jacksonville.com wrote:
>
> Is this newsgroup archived? I'm trying to find information on
> converting PERL scripts to .exe files. We played around with perl2exe
> which works, but the files are huge (Is it just attaching the
> interpreter to the file?) Anyone know of any other options?
> -Jesse Reisman (jreisman@jacksonville.com)
You could try looking at 'www.dejanews.com' they keep fairly
comprhensive archives, also look at the info on the Perl web site at
'www.perl.com'.
Simon
------------------------------
Date: 22 Aug 1997 07:47:22 GMT
From: "Claudio Tassi" <darkstar@mail.janet.it>
Subject: Re: CGI Error, any ideas?
Message-Id: <01bcaecf$79ecda00$0200000a@darkstar>
george@adirondack.net wrote in article <5thlrv$lkf$1@Usenet.Logical.NET>...
> Next: needed Perl for the CyberCash servers, so installed it. Now get CGI
> Errors randomly which require a reboot to correct. The message is CGI
Error:
> The CGI application you are running misbehaved by not returning proper
> headers. The headers it did return are:
Make sure your server adds correct http headers some servers needs that you
print:
status 200/OK
as the first line of output and then
content-type text/html\n\n
You can also try launching your program from a command prompt session (feed
it correct variabiles) for debugging purposes, to make sure that it
terminates correctly.
Bye
Claudio
------------------------------
Date: 22 Aug 1997 03:18:32 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: defined(<file>) bumps handle in perl5.004_1?
Message-Id: <5tj0e8$av3@news-central.tiac.net>
In article <Pine.HPP.3.93.970821175122.12175G-100000@merle.acns.nwu.edu>,
Nicholas Geovanis <n-geovanis@nwu.edu> wrote:
>
>It seems that using "defined(<STDIN>)" in an if-statement's
>expression in perl5.004_1 under HPUX 10.20 causes an iteration of the
>file-handle. My impression from pg. 53 of the 2nd ed. Camel book is that
>this isn't supposed to happen. Who's right? Perl or the Camel? Or am I
>just wrong?
What it's doing is testing whether the result of <STDIN> is defined, so a
record is read from the file handle (if there's a record avaialble.)
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com | Pencom Systems Administration (work)
------------------------------
Date: Thu, 21 Aug 1997 20:05:32 -0700
From: Devin Ben-Hur <dbenhur@egames.com>
To: n-geovanis@nwu.edu
Subject: Re: defined(<file>) bumps handle in perl5.004_1?
Message-Id: <33FD01FC.402A@egames.com>
[mail&post]
Nicholas Geovanis wrote:
> It seems that using "defined(<STDIN>)" in an if-statement's
> expression in perl5.004_1 under HPUX 10.20 causes an iteration of the
> file-handle. My impression from pg. 53 of the 2nd ed. Camel book is that
> this isn't supposed to happen. Who's right? Perl or the Camel? Or am I
> just wrong?
They're both right. The Camel doesn't say that it doesn't bump the
file handle, it says:
Remember that this special magic requires a while loop. If you
use the input operator anywhere else, you must assign the result
explicitely IF YOU WANT TO KEEP IT. [emphasis mine]
So, the read happens, it just doesn't get magically assigned to $_.
This code:
$_=<STDIN>;print;
if(defined(<STDIN>)) { print; };
$_=<STDIN>;print;
fed this data:
1
2
3
outputs:
1
1
3
just like the Camel says it should
HTH
--
Devin Ben-Hur <dbenhur@egames.com>
eGames.com, Inc. http://www.egames.com/
Warning: Dates in Calendar are closer than they appear.
------------------------------
Date: 22 Aug 97 03:09:26 GMT
From: "Rich Bailey" <ldusadev@kestrok.com>
Subject: delayed execution of a program??
Message-Id: <01bcb03b$1004a470$7f027ece@rich>
Hi:
Does anyone know how to get perl to delay execution of another program. The
user will specify the date and time, and I want my perl script to then run
the program (called isql) at that date and time.
I guess I could sleep for the time difference then do a system(isql ...),
but there should be a more eloquent solution.
Thanks for any ideas,
Rich
------------------------------
Date: 22 Aug 1997 03:43:56 GMT
From: mheins@prairienet.org (Mike Heins)
Subject: Re: Error 49 in SDBM store -- what does it mean?
Message-Id: <5tj1ts$97c$1@vixen.cso.uiuc.edu>
Michael Schuerig (uzs90z@uni-bonn.de) wrote:
:
: I'm trying to get a script that I wrote using MacPerl to work on a Unix
: box. The main difference is that MacPerl uses Berkely DB while on the
: Unix machine apparently only SDBM is available.
:
: Well, at home the script works nicely, on Unix, after some work has
: already been done successfully, I get an error message telling me that
: error 49 occurred in SDBM store. What does it mean and what can be the
: cause of this?
:
I wonder what flavor of UNIX?
The usual error one would expect is 28, ENOSPC, caused by too much key/value
data (DB_File is unlimited, SDBM is limited to 1024 bytes).
You should do:
grep 49 /usr/include/errno.h /usr/include/*/errno.h
On Linux that yields:
/usr/include/asm/errno.h:#define EUNATCH 49 /* Protocol driver not attached */
which error probably does not apply here.
--
Regards,
Mike Heins
This post reflects the
opinion of my employer.
------------------------------
Date: Fri, 22 Aug 1997 13:29:00 -0530
From: Ajitesh Das <ajiteshd@wiproge.med.ge.com>
To: ken1@earthlink.net
Subject: Re: Field Length
Message-Id: <33FDE174.446B@wiproge.med.ge.com>
John, use "length()" buildin function.
Ref [ perlfunc ]
John Grimm wrote:
>
> How do I determine the length of a variable?
--
Rgds
Ajitesh
----
Ajitesh Das ajiteshd@wiproge.med.ge.com
---
"Golden Rule: never derive from a concrete class "
------------------------------
Date: Thu, 21 Aug 1997 22:39:38 -0800
From: rknig@NOSPAM.jsnet.com (Roddy Knight)
Subject: Re: Help with CGI.pm Script
Message-Id: <rknig-ya02408000R2108972239380001@nntp.ix.netcom.com>
After further investigation, I found that the information in the forms was
being passed back to the CGI script. The e-mail message generated by the
textfields was sent successfully. The problem has to do with the
"content-type" string returned to the web browser after it has sent the
information. The reason my web browser wanted to download the output of
the script is because it didn't know the content type the script returned.
The CGI.pm module seems to return a strange content type after it has been
sent data. I am not absolutely sure if it is the CGI.pm module that is
returning the unrecognized "content-type," or apache. The "content-type"
of x-http-cgi is being returned by the script. I did not enter this
content type or any string that would generate this content-type. I have
included the actual information sent to the browser at the bottom of this
letter. I tried manually saying "print content-type: text/html" but the
information sent by the CGI.pm module appears first in the output sent to
the browser. I think it might be a bug in the CGI.pm module but I am
unsure. I have also included a copy of the script showing where the
problem is occuring. I would appreciate any assistance.
Information sent from script to browser after it received textfield input:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML><HEAD><TITLE>New
Account Request Form</TITLE></HEAD><BODY><H1>Account Request
Form</H1>content-type: text/html
<HTML><HEAD><TITLE>Hello World</TITLE></BODY></HTML></BODY></HTML>
I can't interpret the garbage at the start of this output. What does
"!DOCTYPE HTML PUBLIC" followed by "-//IETF//DTD HTML//EN" mean?
Script:
#!/usr/bin/perl -w
use 5.004;
#use strict;
use CGI qw(:standard);
my $writestring = "\r";
my $password = param("password");
my $Sender = "account_request\@csus.com";
my $Address = "root\@student.csus.com";
my $Subject = "Account Request Automated Form Entry";
my $username = param("username");
my $name = param("name");
print header, start_html("New Account Request Form"), h1("Account Request
Form")
;
sub send_mail {
if (!open(PIPE, "|/usr/lib/sendmail -t"))
{
print h1("Unable to open pipe to sendmail for msg\n");
}
select (PIPE);
syswrite (STDOUT, "$writestring", 5);
$!=1;
print <<EOT;
From: $Sender
To: $Address
Subject: $Subject
\r\n
$name wants an account as $username with $password as his/her password.
\r\n\r\n
EOT
close(PIPE);
select(STDOUT);
}
if (($password) && ($username) && ($name)) {
send_mail();
print "content-type: text/html\r\r";
print "<HTML>";
print "<HEAD>";
print "<TITLE>Hello World</TITLE>";
print "</BODY>";
print "</HTML>";
*** The problem seems to be occuring at this point in the script ***
} else {
print hr(), start_form();
print p("What is your full name: ", textfield("name"));
print p("What username would you like: ", textfield("username"));
print p("What password would you like: ", textfield("password"));
print p(submit("submit"), reset("clear"));
print end_form(), hr();
}
print end_html();
exit;
--
Remove "NOSPAM" from e-mail address to send e-mail
------------------------------
Date: 22 Aug 97 02:21:25 GMT
From: "Brendan Murphy" <info@arkson.com>
Subject: How can I get rid of carriage return in textarea
Message-Id: <01bcaea2$99eccfe0$677112ce@1>
How can I get rid of carriage return in textarea form to avoid messing up
when the database cgi program build a file (db) where all the input should
be on one line?
Thanks in advance.
Brendan brendan@arkson.com
------------------------------
Date: Fri, 22 Aug 1997 13:33:25 -0530
From: Ajitesh Das <ajiteshd@wiproge.med.ge.com>
To: Satyajit Patel <sjpatel@spd.dsccc.com>
Subject: Re: How to Wrap long lines?? (Novice)
Message-Id: <33FDE27D.794B@wiproge.med.ge.com>
Satyajit Patel wrote:
>
> Hi all,
> I have been working with perl for a bit now. But I have not figured out
> how to
> wrap a very long line when printing it to screen.
> I saw someone had written code to do that but I can't remember where I
> saw it. Can someone please help with this?
>
> --Thanks, Jay.
> p.s.
> example:
>
> my $string = " This is a very very long string that should be wrapped
> when printed to screen. But I can't seem to be able to do so.... please
> help!!\n";
> print $string;
>
Satyajit, why dun't you use perl buildin "format" function.
format Something =
Test: @<<<<<<<< @||||| @>>>>>
$str, $%, '$' . int($num)
.
$str = "widget";
$num = $cost/$quantity;
$~ = 'Something';
write;
check perlform man page
Rgds
Ajitesh
----
Ajitesh Das ajiteshd@wiproge.med.ge.com
---
"Golden Rule: never derive from a concrete class "
------------------------------
Date: 22 Aug 1997 01:42:18 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: if (/htm/ && !/html/) {
Message-Id: <5tiqpq$4s5@news-central.tiac.net>
In article <su2iuwz8mhz.fsf@slpyff.ed.ray.com>,
Leonhard Brenner <brenner@slpyff.ed.ray.com> wrote:
>I'll keep it brief, I know there another way but I'm braindead today.
>
> if (/\.htm/ && !/\.html/) {
> print "Changing file name!\n";
> }
If you're looking for a .htm extension then
if (/\.htm$/) {
...
}
or if you're looking for .htm followed immediately by anything other than
an l (even
nothing) then
if (/\.htm(?!l)/) {
...
}
might be useful starting points.
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com | Pencom Systems Administration (work)
------------------------------
Date: Fri, 22 Aug 1997 13:10:34 -0530
From: Ajitesh Das <ajiteshd@wiproge.med.ge.com>
To: Jim Trocki <trockij@transmeta.com>
Subject: Re: naming arrays
Message-Id: <33FDDD22.167E@wiproge.med.ge.com>
Jim Trocki wrote:
>
> Girish, it sounds like you would probably be better off implementing
> this as an array or arrays, where you could address arrays separately.
> Here's a brief example:
>
> @{$bw[0]}=(2,4,6,8);
> @{$bw[1]}=(1,3,5,7);
>
> print "@{$bw[0]}\n";
> print "@{$bw[1]}\n";
>
> Have a look at the "perllol" man page.
Jim, I think the HASH of arrays will be the best alternative.
Is'n it ?
Ajitesh
>
> Jim Trocki
> Computer System and Network Engineer
> Transmeta Corporation
> Santa Clara, CA trockij@transmeta.com
> --
> Jim Trocki
> Computer System and Network Engineer
> Transmeta Corporation
> Santa Clara, CA trockij@transmeta.com
--
Rgds
Ajitesh
----
Ajitesh Das ajiteshd@wiproge.med.ge.com
---
"Golden Rule: never derive from a concrete class "
------------------------------
Date: Fri, 22 Aug 1997 00:59:59 GMT
From: Joachim.Wunder@LRZ-Muenchen.DE (Joachim Wunder)
Subject: NDBM problems - HELP!
Message-Id: <33fce17b.73476@news.lrz-muenchen.de>
Hi!
I am simply trying to create a ndbm database in Perl to write it and to read it
with dbm_open under C.
The problem: Perl 5.004 creates it like `test.db4 and dbm_open (FreeBSD 2.2.1)
expects it to be `test.pag4 and `test.dir4. So dbm_open returns a
NULL pointer if I try to open the test-database which was created
under Perl.
Any help asap would be appreiated!!
TIA,
Joachim
--
Email: Joachim.Wunder@LRZ-Muenchen.DE
------------------------------
Date: 22 Aug 1997 02:22:05 GMT
From: dmacks@sas.upenn.edu (Daniel E. Macks)
Subject: Re: Need a routine to check for DATE
Message-Id: <5tit4d$v39$1@netnews.upenn.edu>
sunil@aquas.com said:
: I am looking for a way to check validity of the input date.
: The date can be in mm/dd/yyyy format. I need routine which will
: do leap year and other normal checks for validity of the date.
: Please send me code if you have or give me location where i
: can get it.
If you're looking to manipulate dates, perhaps the Date::Manip module
would be of use? CPAN (http://www.perl.com/CPAN/) is the first place
I'd look for such stuff.
dan
--
Daniel Macks
dmacks@a.chem.upenn.edu
dmacks@netspace.org
http://www.netspace.org/~dmacks
------------------------------
Date: Thu, 21 Aug 1997 22:35:46 -0400
From: Claude Montpetit <claude@macadamian.com>
Subject: Newbie 'exec' question
Message-Id: <33FCFB01.CA72720@macadamian.com>
I sent a post regarding this earlier. Here is the same question in a
different format since I did not receive any answers to my previous
posting.
I load an application from a perl script. This application outputs HTML
code on the standard output (screen output). I am using 'exec' to load
the application.
Do I need to do something special in the perl script for this output to
be redirected to a browser? The browser does not receive it. Here is my
perl code invoking my application:
exec 'c:\java MyApp';
This perl script is loaded thru CGI and the this application outputs to
screen the HTML code.
Any help will be greatly appreciated.
Claude Montpetit
------------------------------
Date: Thu, 21 Aug 1997 19:08:52 -1000
From: "Dave Hoyt" <dshoyt@worldnet.att.net>
Subject: Re: Newbie 'exec' question
Message-Id: <5tj5e8$kel@mtinsc02.worldnet.att.net>
Although I am not an expert, I have learned to use 'system' vice 'exec'.
The 'system' command spawns the child process and then returns vice a one
way type action. This may be an option that will solve your "challenge."
- Dave
Claude Montpetit wrote in article:
>I load an application from a perl script. This application outputs HTML
>code on the standard output (screen output). I am using 'exec' to load
>the application.
------------------------------
Date: Thu, 21 Aug 1997 22:34:26 -0500
From: "Andrew C. Risehnoover" <qball@ti.com>
Subject: Re: Novice scratches head
Message-Id: <33FD08C1.284BB979@ti.com>
Patrick O'Lone wrote:
> Mike McCurdy wrote:
> >
> > My understanding was that perl would treat these variables as
> integers
> > when used like this. Given that $x's value is not equal to 100000,
> why is
> > $x being printed? TIA ...
> >
> > #!/usr/local/bin/perl
> > $x = system "/usr/bin/sar -r 1 | tail -1 | cut -c26-32";
> > if ($x == 100000) {
> > print $x;
> > }
>
Another trick you can try is 'casting' $x. before the compare, add in
this line:$x*=1;
This will force perl to look at it like a number.
--
Chris Risenhoover
Raytheon-TI Systems
972.927.4962
------------------------------
Date: Fri, 22 Aug 1997 13:22:47 -0530
From: Ajitesh Das <ajiteshd@wiproge.med.ge.com>
To: Tad McClellan <tadmc@flash.net>
Subject: Re: readig a file into an array
Message-Id: <33FDDFFF.2781@wiproge.med.ge.com>
Tad McClellan wrote:
>
> Ed Vander Bush (temp.ed.vanderbush@bentley.com) wrote:
> : Can I
> : open a file
> : @my_array = filehandle
> : close file
>
> : Id there anything wrong with this?
>
> Yes. It will not compile. I'd call that wrong ;-)
>
> Even after modifying it to compile, we still wouldn't know if there
> was anything wrong with it, because you haven't told us what you
Tad, I think this will work,
check this,
=======================================
#!/homes/ajiteshd/bin/perl
open(FP, "my_file") || die "Unable to open file b'coz $!\n";
@my_array = <FP>; # suck the whole file ! yamm yamm
close(FP);
foreach $ele ( @my_array )
{
print $ele;
}
exit 1;
#end of script
=======================================
works fine with me ...
--
Rgds
Ajitesh
----
Ajitesh Das ajiteshd@wiproge.med.ge.com
---
"Golden Rule: never derive from a concrete class "
------------------------------
Date: Thu, 21 Aug 1997 09:52:45 +0500
From: Rene Rivers <rrivers@co.broward.fl.us>
Subject: Reading in a file for use...
Message-Id: <33FBBB8D.6EF1@co.broward.fl.us>
Hi, I need a bit of help. I am trying to write a program that requires
me to read some information from a text file and put it's contents into
an array for use. How do I do this?
Thanks,
Rene Rivers
------------------------------
Date: Fri, 22 Aug 1997 09:31:21 +0100
From: Simon Fairey <sfairey@adc.metrica.co.uk>
To: Rene Rivers <rrivers@co.broward.fl.us>
Subject: Re: Reading in a file for use...
Message-Id: <33FD4E59.167E@adc.metrica.co.uk>
Rene Rivers wrote:
>
> Hi, I need a bit of help. I am trying to write a program that requires
> me to read some information from a text file and put it's contents into
> an array for use. How do I do this?
>
> Thanks,
> Rene Rivers
Try
#!/bin/perl
# File is supplied as argument.
my $File = shift;
open FILE, $File or die "Unable to open $file: $!.";
my @Contents = <FILE>;
close FILE;
foreach( @Contents ) {
chomp; #This will remove the newline.
print "Line is $_\n";
}
Alternatively if you don't need to store the whole file and you just
want to process it line at a time you could do:
After the open():
while( <FILE> ) {
chomp;
print "Line is $_\n";
}
close FILE;
Those are just a couple of ways to do it, there are always more than a
few with Perl.
Simon
------------------------------
Date: Thu, 21 Aug 1997 22:48:57 -0400
From: Pierre Thibaudeau <prt@Teleglobe.CA>
To: perlbug@perl.com
Subject: Right shift (">>") in Perl 5.00401
Message-Id: <Pine.HPP.3.96.970821133131.6879E-100000@alpha.Teleglobe.CA>
Dear perlbug,
After upgrading from Perl5.003 to 5.00401, I discovered a rather annoying
behaviour with the bitwise ">>" operator.
As shown below, the right shift operator ">>" does not extend the sign bit
in 5.00401 as it was doing in earlier versions:
mtts01% perl -e 'print "Version$] : ", (-1 >> 24), "\n";'
Version5.00401 : 255
mtts01% /opt/local/perl5.003/perl -e 'print "Version$] : ", (-1 >> 24), "\n";'
Version5.003 : -1
I posted a message on comp.lang.perl.misc about this and received a
comment from Paul A Sand <pas@unh.edu> saying:
>
> This is (kind of) documented. You can get the old result with `use integer':
>
> % perl -e 'use integer; print "Version$] : ", (-1 >> 24), "\n";'
> Version5.00401 : -1
Under "Integer Arithmetic", the perlop manpage says:
"The bitwise operators [...] always produce integral results. [...] By
default, their results are interpreted as unsigned integers."
1- To make (-1 >> 24) give the value 255, it is the _operand_ that has
to be treated as unsigned, not the result.
2- I find odd that the behaviour of the bitwise operators be governed by
an option that is controlling the arithmetic operators.
3- There are certainly many clever algorithms in use that are dependent
on the sign extension property of ">>" that has been around for so long
in many programming languages, not to mention perl. Why change
something that has proven to be usefull for so long.
4- Having to rely on "use integer;" to make the right shift perform how
it use to is not very appealing, because it will also affect the
behaviour of other operations: the (truly) arithmetic.
I admit that my argument is strongly biased in favor of keeping the
right shift to extend the sign bit.
Cheers.
__
Pierre Thibaudeau | e-mail: <prt@Teleglobe.CA>
TELEGLOBE CANADA |
1000, rue de La Gauchetiere ouest | Tel: +1-514-868-7257
Montreal, QC H3B 4X5 |
Canada | fax: +1-514-868-8446
------------------------------
Date: Thu, 21 Aug 1997 22:52:13 -0700
From: anthony@outshine.com (Anthony Boyd)
Subject: Re: Search Engine scripts ?
Message-Id: <anthony-2108972252130001@anthony.outshine.com>
"Peter Douglas" <rmanocha@rocketmail.com> wrote:
> I am developing a search engine for a company. The search engine is
> probably going to be in a similar format as yahoo or search.com where you
> can search through many categories.
>
> I am looking for a script (preferably free) which does a similar thing.
Lots of scripts do searches. A few do crawlers, which sounds a bit more
like what you're after. Assuming you actually meant searches, and you've
already got a bot for crawling, you might consider Swish, Glimpse, Matt's
Simple Search (not good, it doesn't query an index -- more like a brute
force grep), and I think Selena Sol's archive has one too. You can find
some at:
http://www.yahoo.com/Computers_and_Internet/Internet/World_Wide_Web/Databases_and_Searching/
-Anthony Boyd
www.borland.com
------------------------------
Date: 21 Aug 1997 22:14:54 -0500
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <5tj07e$5qn@pluto.cs.uah.edu>
Following is a summary of articles spanning a 7 day period,
beginning at 09 Aug 1997 09:34:49 GMT and ending at
16 Aug 1997 07:04:47 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" e-mail address and name.
- Original Content Rating is the ratio of the original content volume
to the total body volume.
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Find the NewsScan junkyard at http://www.cs.uah.edu/~gbacon/clpm/
Excluded Posters
================
perlfaq-suggestions@mox.perl.com
Totals
======
Total number of posters: 493
Total number of articles: 1083 (406 with cutlined signatures)
Total number of threads: 441
Total volume generated: 1790.2 kb
- headers: 733.1 kb (14,749 lines)
- bodies: 977.7 kb (31,601 lines)
- original: 708.8 kb (23,758 lines)
- signatures: 76.8 kb (1,723 lines)
Original Content Rating: 0.7250
Averages
========
Number of posts per poster: 2.2
Number of posts per thread: 2.5
Message size: 1692.7 bytes
- header: 693.1 bytes (13.6 lines)
- body: 924.4 bytes (29.2 lines)
- original: 670.2 bytes (21.9 lines)
- signature: 72.6 bytes (1.6 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
138 232.7 (116.2/ 92.7/ 62.7) Tom Phoenix <rootbeer@teleport.com>
37 68.6 ( 23.8/ 44.8/ 25.2) Tad McClellan <tadmc@flash.net>
31 56.8 ( 16.8/ 30.3/ 19.1) Mike Stok <mike@stok.co.uk>
23 35.8 ( 16.4/ 19.3/ 12.5) petri.backstrom@icl.fi
21 26.6 ( 13.2/ 13.4/ 8.7) Danny Aldham <danny@lennon.postino.com>
21 32.8 ( 11.7/ 16.7/ 8.8) Jeremy D. Zawodny <zawodny@hou.moc.com>
19 29.3 ( 14.8/ 10.3/ 4.2) Matthew Burnham <danew@enterprise.net>
12 17.9 ( 6.8/ 9.1/ 5.7) Greg Bacon <gbacon@CS.UAH.Edu>
12 20.2 ( 8.1/ 10.6/ 6.4) brian d foy <comdog@computerdog.com>
9 14.0 ( 4.8/ 9.1/ 7.3) Andrew M. Langmead <aml@world.std.com>
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
232.7 (116.2/ 92.7/ 62.7) 138 Tom Phoenix <rootbeer@teleport.com>
68.6 ( 23.8/ 44.8/ 25.2) 37 Tad McClellan <tadmc@flash.net>
56.8 ( 16.8/ 30.3/ 19.1) 31 Mike Stok <mike@stok.co.uk>
35.8 ( 16.4/ 19.3/ 12.5) 23 petri.backstrom@icl.fi
32.8 ( 11.7/ 16.7/ 8.8) 21 Jeremy D. Zawodny <zawodny@hou.moc.com>
29.3 ( 14.8/ 10.3/ 4.2) 19 Matthew Burnham <danew@enterprise.net>
26.6 ( 13.2/ 13.4/ 8.7) 21 Danny Aldham <danny@lennon.postino.com>
22.8 ( 3.4/ 19.4/ 19.4) 4 Magdalene Chua <mag@contact.com.sg>
20.2 ( 8.1/ 10.6/ 6.4) 12 brian d foy <comdog@computerdog.com>
19.5 ( 5.0/ 14.5/ 13.3) 7 ptrainor@aura.title14.com
Top 10 Posters by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
------ -------------- ----- -------
0.9986 2.8 / 2.8 5 "Henry Wolff" <henrywolff@hatsoftnevada.lovelock.nv.us.nospam>
0.9890 5.7 / 5.8 7 Chris Nandor <pudge@pobox.com>
0.9184 13.3 / 14.5 7 ptrainor@aura.title14.com
0.9055 8.1 / 8.9 5 ranson@infoave.net
0.8870 2.5 / 2.8 5 Scott McMahan <scott@lighthouse.softbase.com>
0.8002 7.3 / 9.1 9 Andrew M. Langmead <aml@world.std.com>
0.7963 4.8 / 6.1 8 Matthew Cravit <mcravit@shell3.ba.best.com>
0.7959 7.1 / 9.0 7 tina@mail.scandinaviaonline.se
0.7679 6.3 / 8.2 5 Terry Michael Fletcher - PCD ~ <tfletche@pcocd2.intel.com>
0.7548 4.4 / 5.9 5 Benjamin Holzman <bholzman@mail.earthlink.net>
Bottom 10 Posters by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
------ -------------- ----- -------
0.5916 6.7 / 11.3 9 Tom Grydeland <tom@mitra.phys.uit.no>
0.5792 4.0 / 7.0 7 Honza Pazdziora <adelton@fi.muni.cz>
0.5700 3.2 / 5.5 8 Aaron Sherman <ajs@lorien.ajs.com>
0.5638 25.2 / 44.8 37 Tad McClellan <tadmc@flash.net>
0.5285 8.8 / 16.7 21 Jeremy D. Zawodny <zawodny@hou.moc.com>
0.5250 2.0 / 3.9 5 Morten Simonsen <mortensi@idt.ntnu.no>
0.4867 2.4 / 4.8 7 Bart Lateur <bart.mediamind@tornado.be>
0.4507 3.5 / 7.8 6 Ilya Zakharevich <ilya@math.ohio-state.edu>
0.4096 4.2 / 10.3 19 Matthew Burnham <danew@enterprise.net>
0.3421 2.5 / 7.4 7 Thad Welch <tw36027@glaxowellcome.com>
Top 10 Threads by Number of Posts
=================================
Posts Subject
----- -------
14 How to treat "\n" as "\n" ?
12 map problem
11 Is there a perl IDE?
9 Seeking object enlightenment
9 perl question
9 How to open a file to a variable instead of an array?
9 incredibly simple question
8 Need help!
8 Capitals
8 sorting...
Top 10 Threads by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Subject
-------------------------- ----- -------
23.4 ( 10.1/ 12.3/ 7.4) 14 How to treat "\n" as "\n" ?
20.5 ( 2.8/ 17.7/ 14.5) 5 perl5 regexes slower than perl4?
18.1 ( 4.6/ 11.9/ 5.8) 6 Will Pay: Write this script for me!
17.3 ( 7.9/ 7.2/ 4.6) 12 map problem
16.7 ( 6.5/ 9.8/ 6.9) 9 How to open a file to a variable instead of an array?
16.6 ( 6.8/ 8.8/ 5.4) 9 Seeking object enlightenment
16.0 ( 5.8/ 9.0/ 6.6) 8 emacs? No thank you
15.5 ( 2.5/ 13.0/ 13.0) 3 How do I make my hash remember the order elements are inserted?
15.0 ( 7.2/ 6.8/ 5.1) 11 Is there a perl IDE?
14.5 ( 2.9/ 11.3/ 10.2) 4 perl output destroys hard drive ?
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
41 comp.lang.perl.modules
15 comp.lang.perl
6 git.unix.questions
6 comp.lang.java.programmer
6 comp.infosystems.www.authoring.html
5 comp.lang.javascript
5 comp.lang.pascal.delphi.misc
4 comp.lang.c++
4 alt.fan.e-t-b
4 pl.comp.lang.perl
Top 10 Crossposters
===================
Articles Address
-------- -------
22 Frank Carr <amercares@iag.net>
15 Jackson Dodd <jackson@usenix.org>
11 George Cobaugh <gcobaugh@topspeed.com>
9 amde@citenet.net
9 Darin Burleigh <burleigh@hackberry.chem.niu.edu>
9 Tom Phoenix <rootbeer@teleport.com>
8 Magdalene Chua <mag@contact.com.sg>
5 Jeremy D. Zawodny <zawodny@hou.moc.com>
5 stormshield@hotmail.com
4 xxbbell@voicenet.com
--
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084
d2ac158c84c4ece4d22d1000118a8d5491000000
EOF
------------------------------
Date: Fri, 22 Aug 1997 08:15:54 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <33fd49b0.634273@news.tornado.be>
Greg Bacon <gbacon@cs.uah.edu> wrote:
(OCR = original content ratio)
>Top 10 Posters by OCR (minimum of five posts)
Is that good?
>Bottom 10 Posters by OCR (minimum of five posts)
>0.4867 2.4 / 4.8 7 Bart Lateur <bart.mediamind@tornado.be>
Is this bad?
Note that you get a "good" OCR if you only ask questions, and a "bad"
OCR ratio if you only answer them. As in my case.
Bart Lateur
bart.mediamind@tornado.be
------------------------------
Date: 22 Aug 1997 01:12:16 GMT
From: btlewis@Sun.COM (Brian Lewis)
Subject: Re: TCL 8.0: A whole lot of perl
Message-Id: <5tip1g$a04$1@engnews2.Eng.Sun.COM>
Tom Grydeland (tom@mitra.phys.uit.no) wrote:
: ajs@lorien.ajs.com (Aaron Sherman) writes:
: > TCL 8.0 has just been released [...]
: You forgot one:
: Perl handles lists with a lot of grace, where Tcl has none.
: (If the README news list was comprehensive, Tcl still carries
: a O(n) penalty on trivial list indexing, thus multiplying
: complexities on all algorithms using lists or arrays by O(n).)
Sorry Tom, but this isn't true. One of the major changes in Tcl 8.0 is
to use "Tcl objects" to hold values instead of strings. These Tcl_Obj
structures can hold an cached internal representation such as an array
of element pointers for a list. This makes most list operations linear
time.
: > Of course, TCL has:
: ... a long way to go? :-)
Now, now... :-)
Brian
------------------------------
Date: Fri, 22 Aug 1997 05:28:42 GMT
From: andrewb@cadence.com (Andrew Beckett)
Subject: Re: Unix text file problem
Message-Id: <33fd1d79.1458883@nntp>
On Thu, 21 Aug 1997 12:42:36 +0200, Doug Seay <seay@absyss.fr> wrote:
>>
>> In other words append each column onto each other in ascending order.
>
>
>This works for me
>
> perl -pe 's/\s+/\n/g' FILE | sort -n
>
>- doug
Erm, this assumes that the data is in numerical order, which isn't
what was originally asked, I believe.
Andrew.
--
*************************************************************
* Andrew Beckett * Tel: +44 1344 360333 *
* Lead Applications Engineer * Fax: +44 1344 360324 *
* Cadence Design Systems Ltd * Email: andrewb@cadence.com *
* Bagshot Road * *
* Bracknell. RG12 3PH * *
*************************************************************
------------------------------
Date: Thu, 21 Aug 1997 17:50:49 -0700
From: Todd McNeill <toddm@tngi.com>
Subject: Win32::ODBC / String::Approx Problem
Message-Id: <33FCE13D.477B@tngi.com>
Hi-
I am trying to use the String::Approx Perl Module in conjunction with
Win32::ODBC to do a fuzzy search on a result set from a database and I
am getting some strange errors for every row I process:
Use of uninitialized value at C:\PERL\lib/Win32/ODBC.pm line 256.
or
Use of uninitialized value at C:\PERL\lib/Win32/ODBC.pm line 256, chunk
121.
Use of uninitialized value at C:\PERL\lib/Win32/ODBC.pm line 255, chunk
121.
Use of uninitialized value at C:\PERL\lib/Win32/ODBC.pm line 255, chunk
121.
These errors seem to occur every time I call the Data or DataHash
methods. If I use the Win32::ODBC module only and REM out any references
to the String::Approx module, the script does not generate any errors
and I get
a full result set.
Help! If you need any more information, please let me know.
Thanks,
Todd McNeill
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.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 903
*************************************