[16737] in Perl-Users-Digest
Perl-Users Digest, Issue: 4149 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 28 06:05:24 2000
Date: Mon, 28 Aug 2000 03:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <967457108-v9-i4149@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 28 Aug 2000 Volume: 9 Number: 4149
Today's topics:
Re: basic question <anmcguire@ce.mediaone.net>
Re: basic question (Logan Shaw)
Re: basic question (Abigail)
CD Rom with Perl? reevehot@hotmail.com
Re: CD Rom with Perl? <wyzelli@yahoo.com>
Re: clearing a file (Abigail)
Finding size of jpeg file <i_hate_spam@do-not-mail.org>
Re: Finding size of jpeg file zejames@my-deja.com
Re: Golf: Date of Easter (Marcel Grunauer)
how about programming a mud driver in Perl? <maxwelln@purdue.edu>
How do I manipulate each element of an array? <lincolnmarr@nospam.europem01.nt.com>
Re: Kill Me! <iltzu@sci.invalid>
Re: Kill Me! (Rafael Garcia-Suarez)
Re: Managing Temporary Directories/Files <iltzu@sci.invalid>
Re: pattern matching question <callgirl@la.znet.com>
Problem with perl generated images in MSIE4 pages toni_cornelissen@my-deja.com
Search engine <Pratibha.S@in.bosch.com>
Re: Search engine <ntw6maja@fht-esslingen.de>
Re: selling perl to management (Ilya Zakharevich)
Re: selling perl to management (Abigail)
Re: selling perl to management <bart.lateur@skynet.be>
WWW::Search::MSIndexServer <cdw@nospam.hncis.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 28 Aug 2000 02:12:40 -0500
From: "Andrew N. McGuire " <anmcguire@ce.mediaone.net>
Subject: Re: basic question
Message-Id: <Pine.LNX.4.21.0008280206550.1456-100000@hawk.ce.mediaone.net>
On Mon, 28 Aug 2000, Kevin Ackerman quoth:
~~ Date: Mon, 28 Aug 2000 02:17:43 GMT
~~ From: Kevin Ackerman <kevin@kevinackerman.com>
~~ Newsgroups: comp.lang.perl.misc
~~ Subject: basic question
~~
~~ Hello,
~~ I have one simple question, What is the difference between PERL and CGI.
~~ My closest guess is that PERL is an interpreted language and CGI is the
~~ *thing* that makes PERL and a web browser work together. However, I am not
~~ satisfied that this is correct. Any help with the correct answer to my
~~ question would be greatly appreciated.
That is roughly correct, Perl (not PERL) is a programming
(scripting) language, CGI is a specification. A CGI program
may be written in many languages, one of which is Perl. I
think this link may help you out:
http://www.w3.org/CGI
anm
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Andrew N. McGuire ~
~ anmcguire@ce.mediaone.net ~
~ "Plan to throw one away; you will, anyhow." - Frederick P. Brooks, Jr. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: 28 Aug 2000 03:29:47 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: basic question
Message-Id: <8od7tr$qm2$1@provolone.cs.utexas.edu>
In article <39A9D2BD.5E32CCEB@rochester.rr.com>,
Bob Walton <bwalton@rochester.rr.com> wrote:
>Kevin Ackerman wrote:
>> I have one simple question, What is the difference between PERL and CGI.
>> My closest guess is that PERL is an interpreted language and CGI is the
>> *thing* that makes PERL and a web browser work together.
>
>Kevin, you have it exactly right. Perl is an interpreted language (that
>actually compiles to byte-codes at runtime and is then interpreted).
>CGI is short for "common gateway interface", which defines a set of
>standards for programs which communicate with web browsers. A program
^^^^^^^^
Web servers, not browsers. Otherwise you're right.
>in most any language can be used as a "CGI" program.
- Logan
------------------------------
Date: 28 Aug 2000 09:00:41 GMT
From: abigail@foad.org (Abigail)
Subject: Re: basic question
Message-Id: <slrn8qkaga.bbg.abigail@alexandra.foad.org>
Kevin Ackerman (kevin@kevinackerman.com) wrote on MMDLIV September
MCMXCIII in <URL:news:bZjq5.31324$dG.888419@typhoon.nyroc.rr.com>:
:) Hello,
:) I have one simple question, What is the difference between PERL and CGI.
:) My closest guess is that PERL is an interpreted language and CGI is the
:) *thing* that makes PERL and a web browser work together. However, I am not
:) satisfied that this is correct. Any help with the correct answer to my
:) question would be greatly appreciated.
Well, noone knows what PERL is, as PERL was never created.
Perl, however, is a language, that gets *compiled* into an internal
structure, which is then dealt with by an interpreter. More or less
like Java.
CGI is an interface between programs, typically used in a web server/
helper program setup.
There is no relation between CGI and Perl. Programs using CGI can be
written in any language that can access the environment variables, and
read/write from stdin/stdout, including Perl, but it hardly ever occurs
that both programs of a pair communicating using CGI are written in Perl.
Abigail
--
perl -le 's[$,][join$,,(split$,,($!=85))[(q[0006143730380126152532042307].
q[41342211132019313505])=~m[..]g]]e and y[yIbp][HJkP] and print'
------------------------------
Date: Mon, 28 Aug 2000 07:54:28 GMT
From: reevehot@hotmail.com
Subject: CD Rom with Perl?
Message-Id: <8od5rf$fbe$1@nnrp1.deja.com>
I've got a job to put some HTML-driven information onto CD Rom. As I
understand it, a browser will read HTML (and Javascript)from a CD Rom
just as well as from the web.
However, can I use my CGI-BIN? I guess what I mean is, I'm used to
using form-to-mail and other Perl scripts on the web, but can these be
used on a local machine?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 28 Aug 2000 18:03:12 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: CD Rom with Perl?
Message-Id: <Vspq5.1$vD3.370@vic.nntp.telstra.net>
<reevehot@hotmail.com> wrote in message
news:8od5rf$fbe$1@nnrp1.deja.com...
> I've got a job to put some HTML-driven information onto CD Rom. As I
> understand it, a browser will read HTML (and Javascript)from a CD Rom
> just as well as from the web.
>
> However, can I use my CGI-BIN? I guess what I mean is, I'm used to
> using form-to-mail and other Perl scripts on the web, but can these be
> used on a local machine?
>
Not without some form of server.
Checkout Microweb for what you want. (or Xitami, or Apache... etc etc
but Microweb works from a CD-ROM as well and comes with Perl built in)
http://www.indigostar.com/microweb.htm
Wyzelli
------------------------------
Date: 28 Aug 2000 08:01:14 GMT
From: abigail@foad.org (Abigail)
Subject: Re: clearing a file
Message-Id: <slrn8qk70q.bbg.abigail@alexandra.foad.org>
Michael Cook (mikecook@cigarpool.com) wrote on MMDLII September MCMXCIII
in <URL:news:QsXp5.999$83.323995@news.uswest.net>:
__ Hi folks,
__ I have been using this:
__
__ open (TEMP, ">db/members.tmp") || die("Unable to open db/members.tmp");
__ flock(TEMP, $LOCK_EX);
__ print TEMP $null;
__ flock(TEMP, $LOCK_UN);
__ close (TEMP);
__
__ to clear a file - is there a better way (I would like results similar to
__ using cat /dev/null > file) at the command line?
__ Thanks,
Well, from the commandline, it's trivial. No need for cat of /dev/null:
$ > db/members.tmp
Or, if you must do it from within Perl, the shortest I can come up with is:
`>db/members.tmp`;
Or, with open/close:
open my $fh => "> db/members.tmp" or die "... $!";
close $fh;
No need to lock the file (if another process is reading the file, the
content is gone when opening the file anyway), no need to print $null
(whatever that is), and unlocking before closing without flushing is
a nasty habid.
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
------------------------------
Date: Mon, 28 Aug 2000 14:35:02 +0530
From: "Debjit" <i_hate_spam@do-not-mail.org>
Subject: Finding size of jpeg file
Message-Id: <8oeess$8j$1@news.vsnl.net.in>
Is there any way I can find the width and height in pixel, of a jpeg file by
perl program?
regds
Debjit
------------------------------
Date: Mon, 28 Aug 2000 09:54:11 GMT
From: zejames@my-deja.com
Subject: Re: Finding size of jpeg file
Message-Id: <8odcrv$mhf$1@nnrp1.deja.com>
> Is there any way I can find the width and height in pixel, of a jpeg
file by perl program?
You can have a look at the GD Perl module:
use GD;
$image = newFromJpeg GD::Image('image.jpeg');
($width,$height) = $image->getBounds()
Hope this helps
James
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 28 Aug 2000 08:45:02 GMT
From: marcel@codewerk.com (Marcel Grunauer)
Subject: Re: Golf: Date of Easter
Message-Id: <slrn8qk9ii.173.marcel@gandalf.local>
On Sun, 27 Aug 2000 22:41:36 GMT, Tony Bowden <tony@pyxis.blackstar.co.uk>
wrote:
>We had a golf contest in work last week, to find the date of Easter Sunday.
>
>The best I've been able to come up with (by tweaking the winning entry)
>is 97 chars:
>
> $y=pop;$a=(19*($y%19)+24)%30;$b=22+$a+(2*($y%4)+4*($y%7)+6*$a+5)%7;
> print $b<32?"3/$b":"4/",$b-31
>
>But I suspect this isn't the tersest algorithm ...
Nor does it give the correct output. The dates may be ok, I haven't
checked. But the print() doesn't work:
for my $y (1900..2099) {
print "$y, ";
my ($a, $b);
$a=(19*($y%19)+24)%30;$b=22+$a+(2*($y%4)+4*($y%7)+6*$a+5)%7;
print $b<32?"3/$b":"4/",$b-31;
print "\n";
}
__END__
[...]
1986, 3/30-1
1987, 4/19
1988, 4/3
1989, 3/26-5
1990, 4/15
1991, 3/310
1992, 4/19
1993, 4/11
1994, 4/3
1995, 4/16
1996, 4/7
1997, 3/30-1
1998, 4/12
1999, 4/4
2000, 4/23
2001, 4/15
2002, 3/310
2003, 4/20
2004, 4/11
2005, 3/27-4
[...]
It would appear the inline condition EXPR1 ? EXPR2 : EXPR3, when EXPR2
is true, only stretches to the comma in EXPR3, since print() is a list
operator.
In any case, this saves a few bytes and doesn't output the extra numbers
at the end:
print int 3+$b/31,"/",$b%31;
--
Marcel Gr\"unauer - Codewerk plc . . . . . . . . . . . <http://www.codewerk.com>
Perl Consulting, Programming, Training, Code review . . . <marcel@codewerk.com>
mod_perl, XML solutions - email for consultancy availability
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();
------------------------------
Date: Mon, 28 Aug 2000 02:25:13 -0500
From: "Nick Maxwell" <maxwelln@purdue.edu>
Subject: how about programming a mud driver in Perl?
Message-Id: <8od46s$d3n$1@mozo.cc.purdue.edu>
Is this a feasible thing to do? I ordered the Perl Black Book and
Writing More Effective Perl Programs so I could learn the language with the
eventual goal of programming systems for MUDs and their drivers. I would
love some input, ideas, or suggestions toward this end.
Thanks,
- Nick Maxwell
maxwelln@purdue.edu
Computer Science
------------------------------
Date: Mon, 28 Aug 2000 10:46:50 +0200
From: "Lincoln Marr" <lincolnmarr@nospam.europem01.nt.com>
Subject: How do I manipulate each element of an array?
Message-Id: <8od8tj$hd$1@qnsgh006.europe.nortel.com>
I'm having a little trouble at getting at all elements of an array at the
same time.... I'm no perl wizard so this is probably pretty simple.
All I want to do is say 'foreach element of @array, if the element is empty
then set it to otherwise leave it as it is'.
Simple enough??
Here's some of my basic sketches/musings of how I could do it:
$x =1;
foreach (@array) {
if ($array[$x] eq "") { $array[$x] = " " ; }
++$x;
}
but then what happens once you've reached the end of the array? Any
thoughts??
Thanks
--Lincoln
------------------------------
Date: 28 Aug 2000 09:34:50 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Kill Me!
Message-Id: <967452922.26285@itz.pp.sci.fi>
In article <39A9354C.3249FEB7@shentel.net>, Albert Dewey wrote:
>My main reason for raising such a fuss is that I find it absolutely incredible
>that people are so frikken immature that they will, as several said in this group
>(I won't name names), automatically add to their kill file anyone who posts
>jeopardy style. Seems kinda irrational to me. Actually very childlike. My major
Look at it this way: Right now I have about 1200 unread posts in this
newsgroup. That's after my rather extensive killfile, which does not
include jeopardy posters though, gets applied.
I can't possibly have time to read everything that gets posted here.
That means I have to ignore some posts. I prefer to ignore those I'm
least interested in. That means scoring up posts from people I have
seen posting new, useful and interesting information before, scoring
down threads with off-topic subjects, and incidentally killing every
subthread involving our resident troll.
I've yet to see any useful information in a jeopardy post here. That
statistical correlation alone would be enough reason to killfile such
posts, if I could do that automatically. As it is, I won't bother to
add individual jeopardists to the scorefile, since most of them won't
ever post again, making the entry useless.
I am, however, seriously considering scoring down posts from Outlook.
It's not fair, but it would catch a lot of the chaff.
>up what you said with fact. This is how things are properly debated and how
>civilized people handle things, not with curt and rude responses followed by
>*plonk* or what ever the hell that is supposed to mean. Still, I think that it
Plonk, the "sound a newbie makes as he falls to the bottom of a kill
file", means the poster won't ever see your messages again. If they
consider you sufficiently annoying, and have a sufficiently advanced
newsreader, it may also mean they won't see any replies to your posts
either. I've only ever done that to one person.
While it is certainly insulting, it is an odd insult in that the real
offense it not in the word but in the action. (And claiming to have
plonked someone without doing so is considered stupid and plonkworthy
in itself.) The message it sends is somewhere between "Your opinions
are worthless" and "This discussion isn't going anywhere."
In a newsgroup as busy as this, it may even just mean "Sorry, I've no
time for dealing with this." Such is life.
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
"Maybe I shouldn't be singing this song / Ranting and raving and
carrying on / Maybe they're right when they tell me I'm wrong...
NAAAAH!" -- Denis Leary, _Asshole_
------------------------------
Date: Mon, 28 Aug 2000 09:43:13 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Kill Me!
Message-Id: <slrn8qkdcg.sup.rgarciasuarez@rafael.kazibao.net>
Ilmari Karonen wrote in comp.lang.perl.misc:
>User-Agent: postit.pl 0.05
>
>I am, however, seriously considering scoring down posts from Outlook.
>It's not fair, but it would catch a lot of the chaff.
And, by the way, what is 'postit.pl 0.05'?
--
Rafael Garcia-Suarez
------------------------------
Date: 28 Aug 2000 09:43:40 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Managing Temporary Directories/Files
Message-Id: <967455419.3462@itz.pp.sci.fi>
In article <8oco2c$vki$1@nnrp1.deja.com>, Brock wrote:
>> In article <39A97670.3D983F37@shentel.net>, Albert Dewey <timewarp@shentel.net> wrote:
>>
>> system ("rm -fr $Session");
>
>I noticed that Brian d Toy stated the $session can cause problems
>unless you use "list." So, should the above coding be replaced with
>system ("rm -fr -ls $Session"); in the above?
system('rm', '-fr', $Session);
Other ways of writing the same expression include:
system(qw/rm -fr/, $Session);
system(rm => -fr => $Session);
For more information, type "perldoc -f system" at your shell prompt.
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla | "By promoting postconditions to
and its pseudonyms - | preconditions, algorithms become
do not feed the troll. | remarkably simple." -- Abigail
------------------------------
Date: Mon, 28 Aug 2000 01:09:09 -0700
From: "Godzilla!" <callgirl@la.znet.com>
Subject: Re: pattern matching question
Message-Id: <39AA1E25.3C4F6F42@la.znet.com>
"Andrew N. McGuire" wrote:
> Godzilla! wrote:
> ~~ David Gay wrote:
> ~~ > I'm trying to check a pattern to ensure that it's a 6 digit, hyphen
> ~~ > delimited set of numbers, each no less than 0 nor greater than 4 .
> ~~ > Example:
> ~~ > 0-1-2-3-4-4 or 1-2-1-3-4-0 is acceptable.
> ~~ > 02-1-2-3-4-4 or 0-1-2-3-4-5 is not acceptable.
> ~~ (snip)
> ~~ A few weeks back, a number of experts here proclaimed
> ~~ " exit; " to be of little value, if any value at all.
> I have just rejoined the group,
I have tiny blue monkeys flying out my big butt.
> but I doubt that the experts here made that sort
> of categorical blanket statement,
How would you know? You just rejoined this group.
> perhaps you misunderstood something? :-) exit() is handy
> for usage subroutines for example:
Why are you paraphrasing what I already said?
Poly wanna cracker?
> ~~ This meets your parameters precisely and affords an
> ~~ alternative to usual Perl 5 Cargo Cult. Do not respond
> ~~ with changed parameters and "This doesn't work."
> Classical programming paradigm:
> A good program is liberal in what it accepts, but strict
> in what it emits.
Yeah, so what? This test script does
precisely and exactly what the author
asks per his parameters. You have a
problem with this? Would you like my
script to do Pocohontas nude cartwheels
while chanting,
"Hairy Krishna.. Hairy Krishna.." ?????
> Your test script is entirely self contained,
> and provides little flexibility.
Ingenious programmer I am, yes.
> -w, use strict
What the Hades for? This is simple test script.
Don't tell me, you cannot write a short simple
test script without wearing training wheels
and a diaper. Stereotypical Perl 5 Cargo Cultist
diaper wearing Techno-Geekster program illiterate
Language Lawyer.
DUH? MAJOR DUH! Parachute in your Cargo Cult
Mule Manure on some other landing pad than
mine own. I am a programmer, not a standard
issue Copy and Paste technician like you.
> ~~ print "Content-Type: text/plain\n\n";
> I know why, but why? Not every program is a CGI.
Mine are. This is not your script. Bugger off.
> ~~ $string = "0-0-0-0-0-0";
> ~~
> ~~ if (${\length ($string)} > 11)
> ~~ { print "Boss, string is too long.\n $string"; exit; }
> What if the input has leading or trailing white space?
What if an elephant at the San Diego Zoo cuts a fiery fart?
What if extraterrestrial aliens kidnap Ronald McDonald?
Why are you changing parameters, Mr. Whatif? You have
a problem with following instructions?
> Change that line to read:
> my $string = " 0-0-0-0-0-0 ";
No. I have no reason to deliberately feed
my script data outside given parameters.
This is absolutely stupid. Feed this up
your nose.
> and your test script fails to handle that very feasible
> input string.
Feasible? You're suggesting shoving an Idaho potato up
a car's exhaust pipe then complaining this car won't
run right cause it is not equipped to handle a potato
shoved up its rearend.
Listen, you play Old Maid with Monopoly Chance Cards?
> Your test script is not practical as it
> does not even attempt to simulate real world data,
Are you for real? You are pulling a "what if a camel
on the Sahara takes fright of his own shadow and
drops a load on his sheik's right foot?"
What if Black UN Helicopters scan your brain?
What if stick a feathery boa in my big rearend
and prance around like an ostrich?
What if... what if.... what if.....
How lame. What if you get a brain?
> however it would have been nice of the OP to
> provide some sample input, along with his
> expected results.
He did. Try reading with the aid of an index
finger, one word at a time.
> ~~ if (${\length ($string)} < 11)
> ~~ { print "Boss, string is too short.\n $string"; exit; }
> Ditto. Another note, instead of:
> print "Boss, string is too short.\n $string"; exit;
> why not just:
> die "The input string is too short!\n $string\n";
What do you mean why not? This is my script. I put out
effort to throw this together. I will write it any
way I want, Adolf.
Go write your own script.
> ~~ @Array = split (/-/, $string);
> A solution using a regex here does save alot of code,
> I would think it would be faster to as your method requires
> building and iterating over a list.
Clearly you have mistaken me for someone who cares.
I don't give a flying Hoot's arse what you think.
What part of "...an alterative...." do you not
understand? A regex does absolutely diddy squat
compared to what my script does. However, almost
all you Perl 5 Cargo Cultists write diddly squat
one line snippets fitting only for use with Web TV.
I am a programmer. I write scripts.
You people are one liner weenies who appear
to not have a clue how to write a script.
> ~~ if (($#Array < 5) || ($#Array > 5))
> ~~ { print "Boss, string format is wrong.\n $string"; exit; }
> Why not just:
Get a clue. It is my script. Why don't you take
your commands, demands and mule manure for a long
walk on a short ocean pier?
> You certainly have an odd indentation style, inconsistent
> at least.
What business is this of yours? Buzz off.
> ~~ print "Your string passes all tests. Boss, you are a genius!",
> ~~ "\n String: $string";
> ~~ print "\n\n\n--\nGodzilla Rocks!\n",
> ~~ " http://la.znet.com/~callgirl3/inagadda.mid";
> ~~
> ~~ exit;
> It would have anyhow. :-)
Clearly you have no concept on appropriate
use of " exit; "
> Although it would appear your logic is for the most part
> sound
Appears to me your logic came out of a Cracker Jack box.
Here's a shovel, man/woman of a thousand ugly mugs.
Clean up your Perl 5 Cargo Cultist mule manure, Frank.
Godzilla!
--
Perl Monger's Perfect Perl Perl Land.
http://la.znet.com/~callgirl/perlperl.cgi
------------------------------
Date: Mon, 28 Aug 2000 08:51:53 GMT
From: toni_cornelissen@my-deja.com
Subject: Problem with perl generated images in MSIE4 pages
Message-Id: <8od976$il4$1@nnrp1.deja.com>
I've written a perl cgi-script that sends images to a broweser.
When I use that script to include images in my web pages, the
images won't show if I use MS Internet Explorer 4. (I got the
red cross and the text in my alt tag) When I use Netscape or MSIE3
the images show without a problem, and if I use MSIE4 to load just
the image, that also works.
Can somebody please explane how to get complete browser compatibility
for my script? I've included the relevant source below
($filename contains the name of the file and $image the binary data):
## find the extension
$filename =~ s/^.*\.//;
if ($filename =~ /^(jpg|jpeg)$/i) {
$filename = "jpeg";
}
elsif ($filename =~/^(gif)$/i) {
$filename = "gif";
}
## else use the extension as type
if (($filename) && ("image/" . $filname =~ /$ENV{'HTTP_ACCEPT'}/)) {
print "Content-type: image/" . $filename . "\n\n";
print $image;
return;
} ## filename not empty
Thanks, Toni
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 28 Aug 2000 14:28:29 +0530
From: Pratibha Sundarmurthy <Pratibha.S@in.bosch.com>
Subject: Search engine
Message-Id: <8od9dl$9jh$1@proxy.fe.internet.bosch.de>
Hello,
Can anyone give me some info about where I can get some info about
developing a search engine for a web server in Perl ?
Any site , any book ?
Any tip will be appreciated.
thanks in advance
------------------------------
Date: Mon, 28 Aug 2000 12:04:10 +0200
From: Matthias Jaekle <ntw6maja@fht-esslingen.de>
Subject: Re: Search engine
Message-Id: <39AA391A.3DAE1753@fht-esslingen.de>
Hello,
there is a perl module called WWW::Robot . Maybe you can use this.
Bye
Matthias Jaekle
Pratibha Sundarmurthy wrote:
>
> Hello,
> Can anyone give me some info about where I can get some info about
> developing a search engine for a web server in Perl ?
> Any site , any book ?
>
> Any tip will be appreciated.
> thanks in advance
------------------------------
Date: 28 Aug 2000 07:47:30 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: selling perl to management
Message-Id: <8od5ei$bs7$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Abigail
<abigail@foad.org>],
who wrote in article <slrn8qk2pb.bbg.abigail@alexandra.foad.org>:
> I had things
> break in one liners that up till 5.6.0 I would not have hesitated to
> use in production code. (map {$_ .= "a"} "b" broke). A chance that,
> as far as I can tell, had no other justification than making Perl more
> "orthogonal" - quite a non-Perl thing to do.
monk:~->perl5.00503 -wle 'sub a {map {$_ .= "a"} "b"} print a; print a;'
Modification of a read-only value attempted at -e line 1.
Exit 255
monk:~->perl5.00502 -wle 'sub a {map {$_ .= "a"} "b"} print a; print a;'
Modification of a read-only value attempted at -e line 1.
Exit 255
monk:~->perl5.00404 -wle 'sub a {map {$_ .= "a"} "b"} print a; print a;'
Modification of a read-only value attempted at -e line 1.
Exit 2
monk:~->perl5.00402 -wle 'sub a {map {$_ .= "a"} "b"} print a; print a;'
Modification of a read-only value attempted at -e line 1.
Exit 2
Do you consider different exit values as a breakage? And please
repeat between which version numbers the breakage happened?
Ilya
------------------------------
Date: 28 Aug 2000 08:06:23 GMT
From: abigail@foad.org (Abigail)
Subject: Re: selling perl to management
Message-Id: <slrn8qk7ag.bbg.abigail@alexandra.foad.org>
Ilya Zakharevich (ilya@math.ohio-state.edu) wrote on MMDLIV September
MCMXCIII in <URL:news:8od5ei$bs7$1@charm.magnus.acs.ohio-state.edu>:
== [A complimentary Cc of this posting was sent to Abigail
== <abigail@foad.org>],
== who wrote in article <slrn8qk2pb.bbg.abigail@alexandra.foad.org>:
== > I had things
== > break in one liners that up till 5.6.0 I would not have hesitated to
== > use in production code. (map {$_ .= "a"} "b" broke). A chance that,
== > as far as I can tell, had no other justification than making Perl more
== > "orthogonal" - quite a non-Perl thing to do.
==
== monk:~->perl5.00503 -wle 'sub a {map {$_ .= "a"} "b"} print a; print a;'
== Modification of a read-only value attempted at -e line 1.
== Exit 255
== monk:~->perl5.00502 -wle 'sub a {map {$_ .= "a"} "b"} print a; print a;'
== Modification of a read-only value attempted at -e line 1.
== Exit 255
== monk:~->perl5.00404 -wle 'sub a {map {$_ .= "a"} "b"} print a; print a;'
== Modification of a read-only value attempted at -e line 1.
== Exit 2
== monk:~->perl5.00402 -wle 'sub a {map {$_ .= "a"} "b"} print a; print a;'
== Modification of a read-only value attempted at -e line 1.
== Exit 2
Arg. Simplied a bit too much.
$ perl5.00503 -wle 'sub a {map {chop} ABC} print a'
C
$ perl5.6.0 -wle 'sub a {map {chop} ABC} print a'
Modification of a read-only value attempted at -e line 1.
$
Abigail
--
$; # A lone dollar?
=$"; # Pod?
$; # The return of the lone dollar?
{Just=>another=>Perl=>Hacker=>} # Bare block?
=$/; # More pod?
print%; # No right operand for %?
------------------------------
Date: Mon, 28 Aug 2000 08:55:58 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: selling perl to management
Message-Id: <ju9kqs46km1ejkposhlf6rjl9mmhdme1m5@4ax.com>
Abigail wrote:
>(The behavioural change I noticed was:
>
> sub AUTOLOAD {print $AUTOLOAD =~ /.*::(.*)/, "\n";}
> *foo = *bar;
> &foo;
>
> This prints 'foo' in 5.6.0 and 'bar' in 5.00503. It's nowhere documented
> what it should print, hence the question "bug or bugfix?").
I think it should be 'bar'. Why? Because &foo no longer exists, it is
nothing but an alias to &bar. it is &bar that gets autoloaded.
This behaviour in 5.6 is potentially dangerous. This aliasing mechanism
is the basis of importing functions from modules. Suppose that while
importing, you also change the name of the function, so the module uses
a different name internally than you use externally. The module also
happens to use AUTOLOAD. Now you come to the point where you actually
call your function, and AUTOLOAD kicks in, with the *user supplied
name*, not the name that the module knows! Of course, the module won't
have a clue what you're talking about, and this gives an error. Ugh.
Well, it looks like this scenario is what would happen.
--
Bart.
------------------------------
Date: Mon, 28 Aug 2000 00:24:57 -0700
From: "C. David Wilde" <cdw@nospam.hncis.com>
Subject: WWW::Search::MSIndexServer
Message-Id: <Kfoq5.311$1f2.187046@news.pacbell.net>
Hello all,
This is a two part question. I am having some problems getting the
MSIndexServer class search working on IIS 5.0. Am I correct in assuming
that the Indexing Service is not the same as MSIndexServer? If so is there
a module that will allow me to search using the Indexing Service? The code
that I am using is embedded in an ASP page and looks like this:
.
.
.
use WWW::Search;
my $search = new WWW::Search(MSIndexServer);
my $search_string = WWW::Search::escape_query($query_string);
$search->native_query($search_string);
.
.
.
This works for all of the other search engines in WWW::Search, but I just
get no results with MSIndexServer. BTW the server is running Windows 2000
Server with Active State Perl Build 616. I have tried using the search_url
property with no luck either. If the MSIndexServer class is not compatible
with the Indexing Service of IIS 5.0, I was thinking that I could create an
ADO connection and do the search like that. I have some sample VBScript
code that I would like to convert to perl, but I do not know how to do one
thing. In the VBScript code the line:
<!-- METADADA TYPE="typelib" FILE="C:\Program Files\Common
Files\System\ado\msado15.dll" -->
appears near the top. Is there a perl equivalent to this line? I am also
assuming that perls %INC is the same as the #INCLUDE directive in VBScript.
Thanks in advance for all of your help.
cdw@hncis.com
P.S. There is a severe lack of Perlscript in ASP reference material out
there. Is this completely uncharted territory, or am I an insane fool for
even attempting to do something like this? I personally think that I am an
insane fool, but I'm also stubborn, and I love perl :)
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 4149
**************************************