[9760] in Perl-Users-Digest
Perl-Users Digest, Issue: 3353 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 5 08:06:17 1998
Date: Wed, 5 Aug 98 05:00:50 -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 Wed, 5 Aug 1998 Volume: 8 Number: 3353
Today's topics:
Re: 500 Server error (Dominic Dunlop)
Re: 500 Server error (Plamen Petkov)
Re: Abigail's sig makes me wanna smoke Crack ! <quednauf@nortel.co.uk>
Re: CGI scripts executing other Perl scripts without ha <djinn@tech.eurodyn.com.gr>
Re: comp.lang.perl.announce redux birgitt@minivend.com
Re: comp.lang.perl.announce redux (Paddy Spencer)
Re: comp.lang.perl.announce redux <tchrist@mox.perl.com>
Re: comp.lang.perl.announce redux (Paddy Spencer)
Re: comp.lang.perl.announce redux <tchrist@mox.perl.com>
Re: comp.lang.perl.announce redux <ljz@asfast.com>
Re: comp.lang.perl.announce redux <birgitt@hbg.citnet.de>
Re: comp.lang.perl.announce redux (Jeffrey R. Drumm)
Re: comp.lang.perl.announce redux <birgitt@hbg.citnet.de>
Re: comp.lang.perl.announce redux <ljz@asfast.com>
Re: comp.lang.perl.announce redux (Frank)
Re: comp.lang.perl.announce redux (Chris Nandor)
DBM Crashes and momory out errors caf@netcity.gr
Re: Does anybody have a BANNER AD program? <tchrist@mox.perl.com>
eval{}s and Sig{ALRM}s <adam@fastfare.co.uk>
Re: File already opened by another process? <tchrist@mox.perl.com>
Re: File Upload with Perl (Darren Ferguson)
help me cgi <manning@nospam.com.au>
Re: HELP ME please !!! <quednauf@nortel.co.uk>
Re: hiding user input (Chris Nandor)
mkdir <minich@globalnet.co.uk>
Multiple matches in regular expressions (Mark Thompson)
Re: Multiple matches in regular expressions <jdf@pobox.com>
Re: passwords and DOS/Win b_redeker@my-dejanews.com
Re: PerlScript in .ASP doesnt run in IIS4 <hangtown_nospam@thelostweb.com>
Re: Security in PERL (Dominic Dunlop)
unravelling (?=...), but what's the frog's motivation? <quednauf@nortel.co.uk>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 5 Aug 1998 10:05:16 +0000
From: domo@tcp.ip.lu (Dominic Dunlop)
Subject: Re: 500 Server error
Message-Id: <1dda8v1.1fh48w11bb3pz4N@ppp85.vo.lu>
Martin <minich@globalnet.co.uk> wrote:
> What would
> generally cause this sort of message?
>
> 500 Server Error
Please see the Perl FAQ, aprts 3 and 9, and the perldiag man page.
--
Dominic Dunlop
------------------------------
Date: Wed, 5 Aug 1998 12:57:35 +0300
From: plamendp@techno-link.com (Plamen Petkov)
Subject: Re: 500 Server error
Message-Id: <MPG.103256fa4923c0e0989683@news.techno-link.com>
In article <6q7ire$db3$1@heliodor.xara.net>
Date: Tue, 4 Aug 1998 19:10:30 +0100
Martin wrote:
> Hi!
>
> I have a CGI that is working fine on an NT server but won't do
> anything on a Unix one. I just get this message. What would
> generally cause this sort of message?
>
Do you have this line (as your very first CGI-output):
print "Content-type: text/html\n\n";
--
=== PLEASE REMOVE ## FROM MY EMAIL ADDRESS! GUESS WHY :-) ===
Plamen Petkov
mailto:plamendp##@techno-link.com
------------------------------
Date: Wed, 05 Aug 1998 09:57:17 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Abigail's sig makes me wanna smoke Crack !
Message-Id: <35C81E6D.B885F98B@nortel.co.uk>
>
> BTW: Abigails sig would look a lot better if it were written:
>
> for (@arr) { print "$_"; }
>
> instead of :
>
> for (@arr) { print "elem:$_"; }
Noooo, really ?? My most outrageous apologies that I missed a faux pas
sooo big that it wouldn't fit into the Universe even if I roll it up
like the other 11 dimensions.
Not understanding the sig whatsoever I did that to not to be deceived by
the output.
Apart from that, thanks very much for your quotes :)
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Wed, 05 Aug 1998 12:07:24 +0300
From: Jean-Michel Hemstedt <djinn@tech.eurodyn.com.gr>
Subject: Re: CGI scripts executing other Perl scripts without hanging?
Message-Id: <35C820CC.8695E39B@tech.eurodyn.com.gr>
I had a similar problem, that is not solved anyway in some cases:
(assuming you don't need stdin, and that you don't wait for your batch
script to terminate...)
close(STDOUT); close(STDERR);
exec("./make_dbm.pl"); #prefered to system.
another solution (if your script can't run without stdout open...)
open(STDOUT,">$yourlog");
open(STDERR,"&STDOUT);
exec("./make_dbm.pl");
or better
if ($child_pid = fork) {
#PARENT
...... #whatever you want to be displayed on your page
}else{
#CHILD
close(STDOUT); close(STDERR);
open(STDOUT,">$yourlog");
open(STDERR,">&STDOUT");
exec("./make_dbm.pl"); # >/dev/null");
};
but the best solution to do background jobs, is to implement a batch_job
daemon...
salvador@my-dejanews.com wrote:
> In article <35c65e01.283130625@news.keyway.net>,
> tom@netoutfit.com (Tom O'Neil) wrote:
>
> > The code prints out the display page, but the HTTP connection remains
> > open until make_dbm.pl finishes execution. Any ideas as to how to
> > eliminate this problem?
>
> try redirecting the script stdin and stdout (maybe stderr):
>
> ...
> system ("./make_dbm.pl >/dev/null </dev/null &");
> ...
>
> bye!
>
> - Salva.
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 05 Aug 1998 08:35:53 GMT
From: birgitt@minivend.com
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q95h9$2je$1@nnrp1.dejanews.com>
In article <3j38q6.kc4.ln@localhost>,
tadmc@flash.net (Tad McClellan) wrote:
> Abigail (abigail@fnx.com) wrote:
>
> :
> : But I find it ridiculous
> : every poster in clpa should be able to write English.
Agreed.
> clpa is moderated.
>
> The moderator only (I dunno, really) speaks English.
>
> How can he evaluate if an article in a foreign language is
> appropriate for posting when he cannot read it?
>
He can't.
> Should there be a roll of clpa translators that he can consult
> for a translation or something?
>
Yes, why not ? Or having co-moderators which will help in evaluating
and translating incoming posts in languages other than English.
How much work can that be ? Ten minutes a month ? Too much ?
> He certainly can't just approve it without knowing what it says.
>
Right.
> How will he know what it says?
>
He won't. And if it stays that way, we won't either. :-(
Birgitt Funk
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 05 Aug 1998 10:31:28 GMT
From: paddy.spencer@parallax.co.uk (Paddy Spencer)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <902313088.846222@red.parallax.co.uk>
Kello 05 Aug 1998 08:29:40 +0100, Jim Brewer <jimbo@soundimages.co.uk>
kirjoittanut:
: I'm so glad this a Perl group. That means we don't actually have to
: talk about Perl at all. Perl is just an entry point for what ever
: takes ones fancy to dicuss.
If you think this is bad you should try comp.sys.acorn.* where we've had a
couple of hundred posts on whether people should try to get one individual's
ISP account closed for various objectionable posting habits (like advocating
forced repatriation), then a couple of hundred debating whether ot was right
to do do after his ISP pulled the plug on him for sending them vast numbers
of irritating and irrelevent emails. A couple of months ago on c.s.a.games we
spent upwards of 300 posts discussing pure maths, particle physics and
cosmology - just cos we're soooo wacky! - and there was a _very_ lengthy
thread on the existence or otherwise of God last year.
Most of the time though we argue about the name and/or colour and/or price
and/or feature set of the new machine which is at least vaguely on-topic for
the group...
And on the subject of language: I don't think there should be the restriction
of "English only" but I do think that the moderator should be authorized to
reject any post he can't get translated "as necessary". This also includes
postings in supremely bad English (eg in American ;-)
--
Paddy Spencer
Parallax Solutions Ltd (http://www.parallax.co.uk/)
------------------------------
Date: 5 Aug 1998 10:39:06 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q9coa$q57$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Jim Brewer <jimbo@soundimages.co.uk> writes:
:I noticed that as well. I have also noticed very few Perl books
:translated into English. I wonder why that is? No lack of demand
:then.
What, pray tell, are you referring to? Virtually all Perl books are
written in English, although some find their way into translation
to other tongues. Be very, very careful: Please don't say something
hopelessly offensive and provincial. I've got a hot button quite close
to you just waiting to be pressed.
--tom
--
It's there as a sop to former Ada programmers. :-)
--Larry Wall regarding 10_000_000 in <11556@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: Wed, 05 Aug 1998 10:40:33 GMT
From: paddy.spencer@parallax.co.uk (Paddy Spencer)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <902313634.334770@red.parallax.co.uk>
Kello 3 Aug 1998 13:01:07 GMT, Tom Christiansen <tchrist@mox.perl.com>
kirjoittanut:
: In comp.lang.perl.misc, mjd@op.net (Mark-Jason Dominus) writes:
: :Either way, I don't understand why it is
: :necessary to state in advance that all such articles will be
: :rejected.
: Why do we have `English-only' laws in various places around America, or
: `French-only' laws in others? Unabashed cultural imperialism is my take,
: something that has no business in law.
Well, French is still the official diplomatic language. I believe
international treaties are still drawn up in French.
Incidentally, it is legal to speak French in the House of Commons (the
British Parliament's Lower House) but not Welsh.
OK, then how about:
"All initial postings to must be in English; after approval two copies in
French must be provided. These will be PGP signed by both the original and
the moderator, who will then exchange copies and shake hands for the cameras.
The approved article will not be posted to clpa or any other newsgroup;
instead an announcement of the historic agreement between author and
moderator will be made and a url pointing to the photographs will be posted."
--
Paddy Spencer
Parallax Solutions Ltd (http://www.parallax.co.uk/)
------------------------------
Date: 5 Aug 1998 10:42:19 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q9cub$q57$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
paddy.spencer@parallax.co.uk writes:
:reject any post he can't get translated "as necessary". This also includes
:postings in supremely bad English (eg in American ;-)
Last straw, monkey boy. I'd be quite happy to go up against you in an
English proficiency exam. Shall we? I am a native speaker of English,
you know, and just because I don't have an obseqious Home Counties accent
in no way alters this.
--tom
--
I hate programs that chdir --Boyd Roberts
------------------------------
Date: 05 Aug 1998 06:44:16 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <ltd8afzp1b.fsf@asfast.com>
Jim Brewer <jimbo@soundimages.co.uk> writes:
> fl_aggie@thepentagon.com (I R A Aggie) writes:
>
> > Notice, tho, that the Camel wasn't translated into English.
>
> I noticed that as well. I have also noticed very few Perl books
> translated into English. I wonder why that is? No lack of demand
> then.
>
> I'm so glad this a Perl group. That means we don't actually have to
> talk about Perl at all. Perl is just an entry point for what ever
> takes ones fancy to dicuss.
Well, I realize that it's a rare occurrence, but I have actually seen
instances here where Perl was discussed. Once in a while, be it by
accident or some sort of brilliant stroke of genius, someone actually
comes up with a Perl-related topic that has not been discussed here
before, and hence, which has not yet made it into the FAQ's and other
doc's. When this highly unusual situation occurs, one often will find
an ensuing discussion here in c.l.p.m.
Of course, given the fact that these new Perl-related topics are
likely to then be added to this ever-growing body of documentation, we
find ourselves in the situation where it is increasingly unlikely as
time progresses that we will see anything Perl-related that isn't met
with the bright and cheery "Read the FAQ" response that has become the
delightful and universally beloved trademark of this newsgroup.
> I wonder what the weather's like this time of year for native speakers
> of Swahili? Any takers?
Now *there's* a topic which has not yet made it into the Perl FAQ's!
--
Lloyd Zusman ljz@asfast.com
perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
$t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
$x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'
------------------------------
Date: Wed, 05 Aug 1998 05:42:57 +0000
From: Birgitt Funk <birgitt@hbg.citnet.de>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <35C7F0E1.3DC72CB7@hbg.citnet.de>
Abigail wrote:
>
> I R A Aggie (fl_aggie@thepentagon.com) wrote on MDCCXCIX September
> MCMXCIII in <URL: news:fl_aggie-0408981513560001@aggie.coaps.fsu.edu>:
> ++ In article <6q7a04$fm$1@client3.news.psi.net>, abigail@fnx.com wrote:
> ++
> ++ + Isn't it odd? People complain about the low quality of translations,
In this thread there were complaints about the low quality of
Bablefish's
translations only, not complaints about translations in general.
> ++ + yet insists on having announcements translated to English - cause they
> ++ + won't be able to read the original message.
And I don't think that is wrong. I would *neither expect*, nor
*encourage*,
non-English posts in in any comp.lang.perl.* NG, but rather strongly
support
the netiquette of using English in all comp.lang.perl.* groups based
in English speaking coutries.
But not so for c.l.p.a.
INHO, c.l.p.a, I thought, had a different mission than pure technical
cooperation and support of Perl programmers worldwide. I thought it
is a pool for dropping off and accumulating information about
developments, publications,and events worldwide.
It is likely, because of the less technical content of the posts, that
more information in other languages than English are coming in - with
information which might be very useful to know for everyone worldwide
- .
Therefore exactly, and only in c.l.p.a, I would expect to be non-
restrictive to non-English posts and would hope they get translated,
evaluated and posted in both language versions, thus ensuring that
the translation is checked by quite some audience and not
misunderstood.
> ++
> ++ And if your intent is to gain the widest possible audience, then one
> ++ should use the linga franca of the business, which for the momement
> ++ is English.
>
> I am sure they would. That's not an argument to make it mandatory.
But a reasonable argument to make c.l.p.a a workable and useful
NG for worldwide audience.
>
> ++ Personally, I don't care what language the announcement is posted
> ++ in. Just so long as the subject line isn't in English, I won't get
> ++ annoyed.
> ++
> ++ + People, if you can't read French, German, Italian, or Polish, that's
> ++ + your loss. Don't punish others by forcing them to translate due to
> ++ + your own shortcomings.
I don't think it's a punishment at all. Or do you honestly think that
information from a Laotian Perl programmer in "whatever it is called
they speak over there" is not of interesting to know for a Tansanian
Perl programming student. You honestly ask they both learn first each
other's native languages instead of using English for communication ?
:-)
There are much for fun reasons and justifications to learn whatever
language you want than a Perl NG, I would think. :-)
> ++
> ++ True enough. On the other hand, if your goal is to get your software
> ++ out in front of as many people as possible, and to get them to use it,
> ++ perhaps writing the documentation in Swahili isn't feasible...
>
> Really? Then why is there an Italian translation of the Camel?
>
Because overall programming comprehension is easier/faster/more
spontaneously gained in your native language than in a second
language for the novice programming and/or novice Perl programming
student.
Specialty bookstores in Germany keep a huge active inventory of
programming books of the original English books _and_ their
translated German versions. I asked booksellers why and what sells
better.
Answer:
1. The real hackers and experts buy the original English versions
because they don't want to waste time to be distracted by possible
mistakes introduced through the translations.
2. The programming students buy the German versions, as they have
less overall comprehension difficulties for programming features
in their native language.
3. It depends on the qualtity of the translation, some are so Germlish
that one is better off with the English original.
Living proof:
Me, learning programming from scratch at point zero,
I read Kernighan/Ritchie, Camel, Panther, Regular Expression and
many other books in both versions, sometimes side by side, and
won't want to miss either version. I can't be the only one -
at least publishers seem to have taken account into that need.
This being said, I would never expect in a medium like a usenet
comp.lang.* NG not to use English as long as the NG has not
a language extension.
Just c.l.p.a, I think, could and may be should be an exception.
Birgitt Funk
------------------------------
Date: Wed, 05 Aug 1998 11:01:30 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <35c83a6a.419040338@news.mmc.org>
On Wed, 05 Aug 1998 01:35:06 GMT, gburnore@databasix.com (Gary L. Burnore)
wrote:
>On 04 Aug 1998 21:15:04 -0400, in article <ltogu0z0tj.fsf@asfast.com>, Lloyd
>Zusman <ljz@asfast.com> wrote:
>[snip]
>>And besides, I'm sure I'm not the only person here who would have
>>*fun* learning a bit about various non-English languages by reading
>>these announcements. As it is, I love testing my Spanish knowledge by
>>trying to decipher all the nuances of the Spanish subway ads here in
>>NYC.
>So clpm isn't for people to ask Perl questions that just might be in a faq but
>it is a place to learn a new language? Interesting.
Um, I believe the group under discussion here was c.l.p.a, not c.l.p.m.
(snip)
>Why don't you post your question in all of the other dialects of the world and
>then you'll get an answer.
Well, that would be interesting, since you can't post questions to c.l.p.a.
Well, actually you can, but I really doubt Randal would approve them.
--
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center - Medical Information Systems Group
drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me
------------------------------
Date: Wed, 05 Aug 1998 06:02:17 +0000
From: Birgitt Funk <birgitt@hbg.citnet.de>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <35C7F569.F9C23740@hbg.citnet.de>
Nathan Torkington wrote:
>
> Randal Schwartz <merlyn@stonehenge.com> writes:
[snip]
>
> > 5) Book/magazine/article/website pointers/reviews are permitted only
> > from a third-party; no PR from the author or the publisher, please.
>
> So. Tom and I are going to put lots of recipes and a couple of the
> introductions from The Perl Cookbook on the web. Judging from their
> reception on comp.lang.perl.misc, this would be of considerable
> interest to the (worldwide or not) Perl programming community.
>
> This clause would appear to suggest that I ask a friend to plug it on
> comp.lang.perl.announce. This is one step away from those "I just
> visited a great web site and I thought you should know about it ..."
> spams. Why are you *encouraging* this kind of indirect action?
>
Yes, why ? :-(
>
> Perhaps if you posted the reasons behind your rules, they might make
> more sense. Right now, though, it looks as though you're intent on
> having as few commercial posts as possible on comp.lang.perl.announce.
> Instead of creating broad guidelines for what is and what is not
> acceptable and using subject tagging to allow readers to filter out
> the messages they're not interested in, you're attempting to finely
> filter the articles yourself. I don't like that.
I only fear that the results are a bit boring and won't reflect
what is interesting to know from all sorts of places.
Couldn't Mr. Schwartz accept the help from co-moderators to help
him overcome possible conflicts of interest or legal conflicts he
might fear for himself (of course this is just an assumption) and help
to
overcome the language restriction he feels he needs to put up ? It
would make such a more fun and interesting c.l.p.a, don't you think ?
Birgitt Funk
------------------------------
Date: 05 Aug 1998 07:11:32 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <lt90l3znrv.fsf@asfast.com>
Tom Christiansen <tchrist@mox.perl.com> writes:
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc,
> Jim Brewer <jimbo@soundimages.co.uk> writes:
> :I noticed that as well. I have also noticed very few Perl books
> :translated into English. I wonder why that is? No lack of demand
> :then.
>
> What, pray tell, are you referring to? Virtually all Perl books are
> written in English, although some find their way into translation
> to other tongues. Be very, very careful: Please don't say something
> hopelessly offensive and provincial. I've got a hot button quite close
> to you just waiting to be pressed.
Then again, the comment you refer to could just as easily have been a
lighthearted joke concerning the fact that the vast majority of Perl
books, already having been written in English, have had no necessity
to be *translated* into that language.
When you have a hot button, all sorts of things can look like a finger
trying to push it. :)
--
Lloyd Zusman ljz@asfast.com
perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
$t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
$x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'
------------------------------
Date: 05 Aug 1998 13:17:07 +0200
From: dont_use_this_ey@hotmail.com (Frank)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <yo94svr8yq4.fsf@nym.sc.philips.com>
birgitt@my-dejanews.com writes:
>
> In article <fl_aggie-0308981557290001@aggie.coaps.fsu.edu>,
> fl_aggie@thepentagon.com (I R A Aggie) wrote:
> > In article <35C5F44B.79E8@min.net>, jdporter@min.net wrote:
> >
> > + How's this: the moderator adds a link at the bottom of each post
> > + (added via a perl script, of course) which invokes AltaVista's
> > + BabelFish appropriately so as to give a desired translation.
> >
> > Have you actually tried to use BabelFish? This is what you posted
> > above, in German:
> >
> > Wie dieses ist: der Moderator f=FCgt ein Link an der Unterseite jedes
> > Pfostens hinzu (hinzugef=FCgt =FCber einen Perl-Index, selbstverst=E4nd=
lich) der
> > BabelFish AltaVistas passend hervorruft, um eine gew=FCnschte =DCberset=
zung
> > zu geben.
Zufaellig habe ich heute ein Perl Script erhalten, dass deutsche Texte
ins Schwaebische uebersetzt! Obiger Text wird damit deutlich
verstaendlicher:
Wie dieses ischd: dr Moderador figd oi Link an dr Onderseide jedes
Bfoschdens hinzu (hinzugfigd ibr en Berl-Endex, selbschdvrschd=E4ndlich) dr
BabelFish AldaVischdas bassend hervorrufd, om a gewinschde Ibersedzong
zu geba.
[I further processed the BabelFish translation and showed output in a
german dialect]. Now I'm thinking on some iterative(and or combined
with BabelFish) processing of (german) language to produce english
output.
viele Gruesse
=09Frank
How's dhis: dhe moderador adds a link ad dhe boddom of each boschd
(added via a berl scribd, of course) which envokes AldaVischda's
BabelFish abbrobriadely so as do give a desired dranslazion
------------------------------
Date: Wed, 05 Aug 1998 07:47:57 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <pudge-0508980747570001@192.168.0.3>
In article <3j38q6.kc4.ln@localhost>, tadmc@flash.net (Tad McClellan) wrote:
# clpa is moderated.
#
# The moderator only (I dunno, really) speaks English.
#
# How can he evaluate if an article in a foreign language is
# appropriate for posting when he cannot read it?
The moderator only (I dunno, really) knows Perl.
How can he evaluate if an article with some XS code is appropriate for
posting when he cannot read it?
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Wed, 05 Aug 1998 11:20:11 GMT
From: caf@netcity.gr
Subject: DBM Crashes and momory out errors
Message-Id: <6q9f5c$dv2$1@nnrp1.dejanews.com>
I have the following script.
#!/usr/bin/perl use DB_File; $QUERIES = tie %q, "DB_File",
"C.DB",O_RDWR|O_CREAT,0777,$DB_HASH; for ($x=0;$x < 100000000;$x++) { $q{"1"}
.= asdf asd fa sd fa sdfas df asd f asd f as df asdf as df as df as df as df
as df as df as df as d fa sd fa sdf as df as df as df as df as d f asd fa sd
f asd fas df a sdf as df as df as df asd f asd fas df as df asdf as df asd f
asd f asdf as df as df asd f asdf as df as df as df giannopoulos"; }; Execute
it. you will see the proccess using enormous memory that increases
exponentially, to end to the termination of the proccess. (im talking about
hundreds of MB used.
but the following script has no problem dealing with extra-super-large db's.
#!/usr/bin/perl
use DB_File;
my (%dbw,%dbt,%dbx);
$QUERIES = tie %q, "DB_File", "C.DB",O_RDWR|O_CREAT,0777,$DB_BTREE;
for ($x=0;$x < 100000000000000000;$x++) { $q{"$x"} = "sdfsdf asdf asd fa sd
fa sdfas df asd f asd f as df asdf as df as df as df as df as df as df as df
as d fa sd fa sdf as df as df as df as df as d f asd fa sd f asd fas df a sdf
as df as df as df asd f asd fas df as df asdf as df asd f asd f asdf as df as
df asd f asdf as df as df as df giannopoulos"; };
The momory usage stays low, and the db can keep up with GB of size.
am i missing something?
Tested on a linux machine (2xppro,scsi,64mb ram,128 mb swap);
alex.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 5 Aug 1998 10:59:22 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Does anybody have a BANNER AD program?
Message-Id: <6q9dua$q57$3@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, "Rick Ryan" <rickryan@mindspring.com> writes:
:Can I use Perl to create a rotating banner ad?
Surely.
:Does anyone have any code
:they could send? Thanks
Are you aware of how much you will be hassled for even asking,
and hated if you do this? Advertising sucks, especially in your
face, intrusive, epileptic-seizure inducing <BLINK>y <JUMP>y web
adverts.
--tom
--
"Contempt, rather than celebration, is the proper response to
advertising and the system that makes it possible." --Neil Postman
------------------------------
Date: Wed, 05 Aug 1998 09:19:44 +0000
From: Adam Ipnarski <adam@fastfare.co.uk>
Subject: eval{}s and Sig{ALRM}s
Message-Id: <35C823B0.25BE40EB@fastfare.co.uk>
Hi all,
I seem to be having a problem with using timeouts within an eval
statement. Basically, I'm waiting for stuff to come back through a UNIX
domain socket, and in order not to kill the program, I enclose the
reading within an eval{}. I also set SIG{ALRM} using the alarm XX;
statement, and then trap the return. If it returns 'timeout', I go off
and retry or whatever. The code follows:
eval {
## Timeout loop
local $SIG{ALRM} = sub { die "timeout" };
alarm 6000;
$returned = "\r\n";
while ($returned eq "\r\n" || $returned =~ /\\8800/) {
$returned = "";
my $retval=1;
while($retval > 0) {
my $tmpbuff = "";
$retval = sysread(SOCK,$tmpbuff,4096);
$returned .= $tmpbuff;
}
$returned = (split("\n",$returned))[0]."\n";
}
alarm 0;
};
if ($@ && ($@ =~ /timeout/)) {
print STDERR "** ** ** TIMEOUT ** ** SEND:$data,OS:$!,PID:$$\n\n";
## .. Do other stuff...
}
The problem is that Perl help says that alarm sets the timeout in
seconds, so I set the timeout to alarm 60;. However, this then leads to
very starnge behaviour, with the eval timing out in under a second, but
sometimes working fine!!! I tried alarm 60000 (in case it was in
milliseconds) but now this didn't timeout at all. How do I get it to
always timeout after 60 secs have elapsed? The accuracy of the timeout
can be as wide as +/- 10s, so I figured using SIG{ALRM} would be okay.
Can anyone help with this problem? Any help would be greatly
appreciated.
(If it helps, I'm using 5.004 on Solaris 2.51. The problem seems to
occur both when called as a CGI script and from the terminal)
--adam
Adam Ipnarski, Developer
adam@fastfare.co.uk | www.travelselect.com
'Quantum Mechanics is God's way of saying "Trust Me".'
------------------------------
Date: 5 Aug 1998 11:07:34 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: File already opened by another process?
Message-Id: <6q9edm$q57$4@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, address@in.sig (JJ Good) writes:
:Is there a way in perl to check if a file is already opened by another process ^M
:running on the system?^M
:^M
(You have queer ^M's in your message. Better fix that.)
You'll need the cooperation of your operating system -- you _d_o have
one of those, don't you? The only easy way I know of is to call lsof on
the file.
The latest distribution of lsof is available via anonymous ftp from
the host vic.cc.purdue.edu. You'll find the lsof distribution in the
pub/tools/unix/lsof directory.
--tom
--
Welcome to Microsoft!
Plase set your watch back 20 years.
------------------------------
Date: Wed, 05 Aug 1998 09:29:46 GMT
From: Darren@introdesign.com (Darren Ferguson)
Subject: Re: File Upload with Perl
Message-Id: <35c825ce.2131839@news.demon.co.uk>
On Tue, 4 Aug 1998 15:39:33 GMT, Brent Michalski <perlguy@inlink.com>
wrote:
>Try CGI.pm
>
>It is at:
>http://stein.cshl.org/WWW/software/CGI/cgi_docs.html
>
>It has built-in subroutines for file uploads.
>
>HTH,
>
>Brent
Unfortunately.... I can't.... I really do need a Perl only
solution.... I've used CGI.pm before but simply can't install it on
the system i'm using due to tight administrators.....
------------------------------
Date: Wed, 5 Aug 1998 21:04:25 +1000
From: "tom" <manning@nospam.com.au>
Subject: help me cgi
Message-Id: <35c83d6a.0@news1.idx.com.au>
Um this maybe a dumb question but anyway...
If im posting some thing to one of my scripts can I make it so the info goes
to the script and the browser is sent to a page of my choice
with out touching the script.
Thank u manning@idx.com.au
------------------------------
Date: Wed, 05 Aug 1998 09:42:13 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: HELP ME please !!!
Message-Id: <35C81AE5.D709A516@nortel.co.uk>
Donald W. McArthur wrote:
>
> As described, there is no point in using frames.
I disagree....but anyway, everyone to its own.
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Wed, 05 Aug 1998 07:42:32 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: hiding user input
Message-Id: <pudge-0508980742320001@192.168.0.3>
In article <35ceba00.81152314@nntpd.databasix.com>,
whatpartofdontemailme@dontyouunderstand wrote:
# On Tue, 04 Aug 1998 21:38:24 -0400, in article
# <pudge-0408982138280001@192.168.0.3>, pudge@pobox.com (Chris Nandor) wrote:
#
# >In article <35d58628.67878076@nntpd.databasix.com>,
# >whatpartofdontemailme@dontyouunderstand wrote:
# >
# ># Yeah, you're childish alright. So yes, it IS life. Yours.
# >
# >No, it is not my life. It is your life, and I control it. I control
# >you. I control the vertical and the horizontal. I control your bowel
# >movements and your e-mail. Beware.
#
# As I said. Heard it all before pudge. BTW, why do they call you pudge? You
# short fat and ugly?
Yes. And yet the chicks still dig me, and are repulsed by you. Well, the
adult ones, anyway. Shut your mouth! Jus' talkin' about Pudge.
Wakaka-wakaka, shoop shoop. Ok, enough of that. You will have a painful
bowel movement ... now! Bwahahahahaha!
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Wed, 5 Aug 1998 12:24:06 +0100
From: "Martin" <minich@globalnet.co.uk>
Subject: mkdir
Message-Id: <6q9fde$3lu$1@heliodor.xara.net>
Hi!
I have the following code as part of a script
$absdir = "/www/Data/$FORM[$bus]";
open(NEWDIR,"|$make $absdir");
print NEWDIR $absdir;
close(NEWDIR);
Where $make is the path to the mkdir command /bin/mkdir
If $absdir contains a space though, I end up with 2 directories one
named the first word, the second named the second word. How can
I just make the one directory.
e.g. $absdir = "/www/Data/Hello me";
I would end up with one directory called Hello and another called me.
How could I just get the one called Hello me?
Martin
------------------------------
Date: Wed, 05 Aug 1998 08:08:20 GMT
From: mark-lists@webstylists.com (Mark Thompson)
Subject: Multiple matches in regular expressions
Message-Id: <35d112f1.20199576@news.supernews.com>
Hi,
I wrote a routine to match a given pattern in a file (that happens to be an
HTML file but this is not a CGI problem) but I found out that there may be
more than one occurance of the given item on a given line. I've searched
through the regular expression documentation and FAQ's and couldn't find
anything about this
Here is the sample data:
<!-- ProdJump="PRODUCT 1" ProdJump="PRODUCT 2" -->
<!-- ProdJump="PRODUCT 3" -->
Here is a portion the subroutine that processes the data:
$match = "ProdJump=";
$htmlfile = "/u/mwt/www/htdocs/index.html"
open(HTMLFILE, $htmlfile) || die "Unable to open $htmlfile\n";
while (<HTMLFILE>)
{
$line = $_;
if ($line =~ m/$match\"(.*?)\"/)
{
print $1 . " is in " . $htmlfile . "\n";
}
}
close(HTMLFILE)
Obviously, the output for this is:
PRODUCT 1 is in /u/mwt/www/htdocs/index.html
PRODUCT 3 is in /u/mwt/www/htdocs/index.html
because the regular expression is taking only the first occurance of
the part of the matched pattern within the ().
The output that I'm looking to get is:
PRODUCT 1 is in /u/mwt/www/htdocs/index.html
PRODUCT 2 is in /u/mwt/www/htdocs/index.html
PRODUCT 3 is in /u/mwt/www/htdocs/index.html
Thanks,
Mark
------------------------------
Date: 05 Aug 1998 07:46:10 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: mark-lists@webstylists.com (Mark Thompson)
Subject: Re: Multiple matches in regular expressions
Message-Id: <zpdjvbot.fsf@mailhost.panix.com>
mark-lists@webstylists.com (Mark Thompson) writes:
> <!-- ProdJump="PRODUCT 1" ProdJump="PRODUCT 2" -->
> <!-- ProdJump="PRODUCT 3" -->
> if ($line =~ m/$match\"(.*?)\"/)
You need to make one change, and you *should* make two. The optional
but recommended change is to use a character class rather than
non-greedy matching, viz., C<[^"]*> instead of C<.*>. In order to
match multiple occurrences of a pattern in a string, you must use the
/g modifier.
while ($line =~ /$match"([^"]*)/g) {
#do something with $1
}
Note that backwhacking the quotes is unnecessary.
Please read perlre and perlfaq6.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf/
------------------------------
Date: Wed, 05 Aug 1998 09:08:46 GMT
From: b_redeker@my-dejanews.com
Subject: Re: passwords and DOS/Win
Message-Id: <6q97et$591$1@nnrp1.dejanews.com>
In article <35c74483.0@news.new-era.net>,
scott@softbase.com wrote:
> b_redeker@my-dejanews.com wrote:
> > does anyone know how you can read a password from STDIN and not show that
> > password on screen?
>
> There is an old DOS command that will turn the screen display off.
> I think it is "mode" or "ctty". Read an old DOS book for details.
>
> Scott
Dan and Scott, thank you very much
I found that the DOS-command doesnt work like that anymore since DOS 6
so it'll have to be the Term::ReadKey stuff
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 5 Aug 1998 01:14:30 -0700
From: "Scott Willsey" <hangtown_nospam@thelostweb.com>
Subject: Re: PerlScript in .ASP doesnt run in IIS4
Message-Id: <35c8132f.0@calwebnnrp>
Ian F Taite <ian.taite.nospam@zen.co.uk> wrote in message
kB3x1.153$c26.297221@news-reader.bt.net...
>Cant seem to get the demo ASP files supplied with ActivePerl 5.005 working.
>It's something to do with the "Default ASP Language" setting in IIS4. If I
>change it from VBScript to PerlScript, none of the ASP files in the virtual
>directory work. If left at VBScript, just those work. When for example, I
>click the link to run Hello World (hello.asp) I just get the hour glass.
Any
>suggestions as how to fix this?
>
>
Their distribution is broken. They forgot to include the OLE.pm and
Registry.pm files. Email me if you need help finding these. After placing
them in the right directories, everything works great.
Scott
(hangtown AT thelostweb DOT com)
......................................................................
Please edit the email address to reply
------------------------------
Date: Wed, 5 Aug 1998 09:51:48 +0000
From: domo@tcp.ip.lu (Dominic Dunlop)
Subject: Re: Security in PERL
Message-Id: <1dda7oe.jv8g8k1t01ry4N@ppp85.vo.lu>
Markus wrote:
> how do I implement the following secure PERL Prog:
> I wrote a PERL prog, which deals with a passwort list, saved in an ASCII
> File.
> The PERL prog is implemented as a CGI-File, which is executed by the
> webserver on demand of a web-surfer.
> The PERL Prog should have access to the file, rights to modify and see the
> content.
> The Web-Surfer should be able to execute it, but not to see the
> Password-File.
Go at once to <http://www.tpj.com>, and find out how to obtain the
current (Summer 1998) issue of The Perl Journal. It contains an article
on precisely this topic: "Safely Empowering Your CGI Scripts" by Lincoln
D. Stein
--
Dominic Dunlop
------------------------------
Date: Wed, 05 Aug 1998 11:04:01 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: unravelling (?=...), but what's the frog's motivation?
Message-Id: <35C82E11.F86B666B@nortel.co.uk>
Ilya Zakharevich wrote:
> a) "zero width" means that the frog will not move after (?=...)
> subexpression is matched.
> b) "Positive" is opposite to "negative"; "I want"
> c) "lookahead" is opposite to "lookbehind",
> d) "assertion" means that there is no side effect except
> acceptance/rejecting of the string (unless some *subexpressions*
> ask for a side effect)
Thanks to Bob and you for your explanations.
for (split /(?=(.*))/s , "Just another Perl Hacker\n") {print "$_\n"}
So, with my limited knowledge I read the following:
split to frog: I have to split that sentence there. I've been told that
I should split on zero or more characters, including newlines.
frog to split: Righto! *checks his tasks* Hmm, I am not supposed to move
while doing my looking. Fair enough, I stretch myself a bit, and look
ahead. Yes, I found what you should split on.
split: Cool, thanks. Uh-oh, brackets. I also need the string we have
splitted on. It is to be included in the output. Right. Well, frog as
you didn't move, there's still stuff from the string left. So do the
whole caboodle again...
And that's where I loose it. What makes the frog move nonetheless?
Above program prints in its first line:
J\n
ust another Perl Hacker\n\n
Apparently split used 'ust another Perl Hacker\n' as split expression.
So the frog was just behind 'J' when the split occurred. It matches the
whole thing following. But doesn't move. However, the next time he seems
to be just behind 'u'. What is the frog's motivation :) ?
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
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 3353
**************************************