[9660] in Perl-Users-Digest
Perl-Users Digest, Issue: 3254 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jul 25 16:07:26 1998
Date: Sat, 25 Jul 98 13:01:01 -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 Sat, 25 Jul 1998 Volume: 8 Number: 3254
Today's topics:
Re: '!' instead of filename in output of warn() spacy13@my-dejanews.com
Announcement: ScriptV--a new language for 2D and 3D ani <shang@transframe.com>
Re: Announcement: ScriptV--a new language for 2D and 3D <tchrist@mox.perl.com>
Can't Get hello.pl to work <stanz@en.com>
Re: Can't Get hello.pl to work <minich@globalnet.co.uk>
Re: Can't Get hello.pl to work <ben@sofnet.com>
Re: Detecting Countries <file@job.to>
Re: Detecting Countries <file@job.to>
Re: Detecting Countries (Michael J Gebis)
Re: Detecting Countries (-)
Help Reading a directory structure <needcrew@tiac.net>
Re: HERE assignment? (Andre L.)
Re: parsing question (brian d foy)
Re: perl as pseudocode (Craig Berry)
Re: Perl Beautifier Page (Larry Rosler)
Re: Perl Beautifier Page (Snowhare)
Re: Perl CGI image and text problem (brian d foy)
Re: Perl with SSI (brian d foy)
Re: perl/mysql connect problem <ben@sofnet.com>
Re: problem with NS cookies (-)
Re: Recent Secret Government Experiments Killing People <davefish@draughnconclusions.com>
Re: Recent Secret Government Experiments Killing People <hex@cyberdude.com>
Re: Recent Secret Government Experiments Killing People (-)
Re: Recent Secret Government Experiments Killing People (-)
Re: seek file (-)
Re: Simple (I hope) Apache/NT/Perl question (Craig Berry)
Re: symbolic links for windows <ljz@asfast.com>
Re: Tcl is better than Perl (Ken Irving)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 25 Jul 1998 17:27:23 GMT
From: spacy13@my-dejanews.com
To: mjtg@cus.cam.ac.uk
Subject: Re: '!' instead of filename in output of warn()
Message-Id: <6pd4hq$i7p$1@nnrp1.dejanews.com>
In article <6pai5p$qm2$1@pegasus.csx.cam.ac.uk>,
mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
> In article <6p7j25$qva$1@nnrp1.dejanews.com>, <spacy13@my-dejanews.com>
wrote:
> [snip example of #line directive]
> >
> >Does anybody have an idea why this happens? Did I miss something?
>
> From near the end of perlsyn:
>
> Plain Old Comments (Not!)
>
--- snip explanation of #line directive ---
Ooops. Pretty obvious if you know what you're looking for. Very
interesting.
Thanks guys!
>
> Ask in news, get the reply in news.
>
> Mike Guy
:-)
Ask in news. Get reply in news. Say thanks in news.
Wouldn't that be a nice signature?
Spacy
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 25 Jul 1998 16:53:33 GMT
From: "David Shang" <shang@transframe.com>
Subject: Announcement: ScriptV--a new language for 2D and 3D animations and graphics
Message-Id: <01bdb7f3$fbc01f50$20fd36ce@shang>
At last, high-level graphics software developments are no longer
exclusively for the use of professional programmers.
ScriptV is a dynamic programming language designed to use the
advanced animation and graphics capacities of today's home computers
It supports various objects, such as images, sounds, key-parameter
animation, interactions, 3D modeling and figure animation, vector
graphics and vector animations, advanced and artistic user
interface creation such as digital book, fancy menus, buttons,
scrolling bars, frames for game developments, particles systems,
tranitional cel animations, hypertexts, transitions, transofrms such
as deformations, morphng, bend, and warping, as well as
other general purpose programing facilities like those in Java.
ScriptV makes 3D modeling and animation programming easy
with a high-level, intuitive system of specifying object components
and combining these components in new ways. For instance,
You can make a 3D model for the thumb of a scrollbar, or floating
an animated 3D figure with hypertext, or relecting the surrounding
hypertext in a 3D model.
ScriptV is readable and easy to understand due to its descriptive
architecture. ScriptV is a natural description of the system
architecture and the interactions within that framework.
Visviva Software, Inc. is pleased to annouce the release
of the Visviva Animation Engine with ScriptV, Beta release 1.0.
ScriptV is available for free with the Visviva Animation Engine
(which is also available for free).
The formal release is scheduled in October, 1998.
If you wish to be included in this mailing list for our latest update
information, send an eamil with subject "SUBSCRIBE" to
"info@visviva.com".
Visit http://www.visviva.com for more information as well as
ScriptV on-line documentations, downloads, and samples.
------------------------------
Date: 25 Jul 1998 17:03:15 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Announcement: ScriptV--a new language for 2D and 3D animations and graphics
Message-Id: <6pd34j$lg3$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
"David Shang" <shang@transframe.com> writes:
:At last, high-level graphics software developments are no longer
:exclusively for the use of professional programmers.
[fortyish lines deleted]
Was there Perl content in this posting and I just missed it?
--tom
--
"The number of UNIX installations has grown to 10, with more expected."
- _The UNIX Programmer's Manual_, Second Edition, June, 1972.
------------------------------
Date: Sat, 25 Jul 1998 16:17:16 GMT
From: stan zylowski <stanz@en.com>
Subject: Can't Get hello.pl to work
Message-Id: <35B93E81.6616@en.com>
Can someone please offer advice..as to why this may not work
on UNIX server. it goes okay on a Windows server.
stan
http://www.prymetime.com/cgi-bin/hello.pl
code is
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, world!\n";
------------------------------
Date: Sat, 25 Jul 1998 17:19:41 +0100
From: "Martin" <minich@globalnet.co.uk>
Subject: Re: Can't Get hello.pl to work
Message-Id: <6pd0jt$s80$1@heliodor.xara.net>
>Can someone please offer advice..as to why this may not work
>on UNIX server. it goes okay on a Windows server.
>stan
It must be that you've got the wrong shebang line. Windows servers
don't need a #! so if it's wrong it doesn't matter. For a Unix server
though, you need the right one. Ask your ISP what it should be.
Martin
PS> If the #! is right, then are you sure that your server wants it to
be called .pl as some need it to be called hello.cgi instead. Again
ask your ISP
>#!/usr/bin/perl
>
>print "Content-type: text/html\n\n";
>
>print "Hello, world!\n";
------------------------------
Date: 25 Jul 1998 11:44:01 -0500
From: Ben <ben@sofnet.com>
Subject: Re: Can't Get hello.pl to work
Message-Id: <35B9C54C.D68AA2FD@sofnet.com>
Stan,
Telnet in, chmod the file with 'x' set, and run the script simply by
typing in the [scripts] name. If it runs fine, then you know it isn't
Perl/Shebang line, and you can move on to the webserver/CGI.
Ben
stan zylowski wrote:
> Can someone please offer advice..as to why this may not work
> on UNIX server. it goes okay on a Windows server.
> stan
>
> http://www.prymetime.com/cgi-bin/hello.pl
>
> code is
> #!/usr/bin/perl
>
> print "Content-type: text/html\n\n";
>
> print "Hello, world!\n";
------------------------------
Date: Sat, 25 Jul 1998 18:54:59 +0200
From: "file" <file@job.to>
Subject: Re: Detecting Countries
Message-Id: <6pd2jf$l9n$1@usenet51.supernews.com>
It is very easy to get an english copy of a browser, I use english copies
eventhough i am in europe---
Andre L. schrieb in Nachricht ...
>In article <6pb16o$5ps$1@news1.epix.net>, "Chris" <nexes@epix.net> wrote:
>
>> Hello,
>>
>> I have an encryption program that may not be exported except to Canada.
It
>> may only be sold in the US and Canada.
>>
>> I want the perl script to check if the user is the US or Canada, and if
they
>> are not - tell them that they must be from the US or Canada.
>>
>> So far I have written a perl script that checks by using
>> $ENV{'HTTP_ACCEPT_LANGUAGE'}. I looks for a the match "en-us". Is this
the
>> best way to do this? Can someone point me to a list of
>> 'HTTP_ACCEPT_LANGUAGE' so I can find all the ones for US and Canada?
>
>Language does not seem to be a great criterium for determining the
>country. For one thing, the official languages in Canada are Engligh *and*
>French.
>
>I don't know what you can do to ensure that you are selling to the right
>country, except ask customers to be so kind as to tell you what country
>they live in.
>
>Andre
------------------------------
Date: Sat, 25 Jul 1998 18:57:57 +0200
From: "file" <file@job.to>
Subject: Re: Detecting Countries
Message-Id: <6pd2oc$m7f$1@usenet36.supernews.com>
according to altavista they can detect from which country people are coming
and then show them the appropriate ad... that is what they told me when I
asked about advertising there...
If you do find a way please do let me know
thanks
Chris schrieb in Nachricht <6pbj6n$has$1@news1.epix.net>...
>I realize that there are different languages within the US and Canada.
>However you seem to be correct in that it isn't the best way, or completely
>accurate way to do this.
>
>I have seen a CGI script that has done this before however. It was done on
>Bruce Schneier's website for twofish. Perhaps IP addresses were used. Are
IP
>addresses assigned acording to location? Perhaps I could get a hold of a
>list of US and Canadian IPs - prefix directory of sorts. Any other ideas?
>
>Not sell over the web? *Pffff* That would hurt my back pocket too much. =)
>
>I appreciate your suggestions
>- Chris
>
>
------------------------------
Date: 25 Jul 1998 17:49:44 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Detecting Countries
Message-Id: <6pd5ro$eg6@mozo.cc.purdue.edu>
"file" <file@job.to> writes:
}according to altavista they can detect from which country people are coming
}and then show them the appropriate ad... that is what they told me when I
}asked about advertising there...
}If you do find a way please do let me know
Of course, if altavista screws it up, some French guy gets an add for
McDonalds. No big deal. If you screw up distributing an encryption
program, you go to jail.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Sat, 25 Jul 1998 19:10:53 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Detecting Countries
Message-Id: <35ba2cd5.153611903@news2.cais.com>
abigail@fnx.com (Abigail) Said this:
>Chris (nexes@epix.net) wrote on MDCCLXXXVIII September MCMXCIII in
>
>*Pffff* Of course not. Anyone can send anything as language. Netscape
>probably ships using "en-us" by default. To mention the fact Canada is
>a multi-languagal country. Or the large amount of people in the US not
>using English as their native tongue.
>
>And I bet a few American and Canadian people have sneaked out of the
>country.
Someone should tell this to congress, and they should pass a law. It's
unthinkable that people would leave "the greatest country in the
world" and "a free country" and all that nonsense!! :)
>
>
>If you are concerned about those encryption laws - don't sell over the
>web. Have them come and pick up the program personally - at make sure
>you keep their passports, otherwise they might hop on a plane and fly
>away!
>
You make it so obvious as to why the whole idea of export restrictions
on encryption technology is such a ridiculous idea - why can't
congress, Mr. Clinton, the NSA, the FBI et al figure this out???
But, as a side note, I think it's MIT, or some other school that does
allow downloads of PGP, but only if their scripting can reasonably
determine that you are coming from a "US Ip address" - of course, this
is not foolproof, but it might just be "reasonable effort" so you
can't be made liable for a few rogue free-thinkers who wish to have
good encryption even though the U.S. doesn't wish them to.
------------------------------
Date: Sat, 25 Jul 1998 14:52:51 -0400
From: "The Needham's" <needcrew@tiac.net>
Subject: Help Reading a directory structure
Message-Id: <6pd9s2$dl8@news-central.tiac.net>
HI,
I am trying to pass a script the name of a directory and have the script
read all the entries below that directory name. If there are any sub
directories then I want it to look in there to. a sample directory
structure is like this
Images - directory
image1.jpg - file
image2.jpg - file
Misc - subdirectory
Image 3.jpg -file
Other - subdirectory
image 4.jpg -file
I have tried using
opendir(DIR, $ARGV[0]) || die "Cannot open $ARGV[0]\n";
@dirs = readdir(DIR);
foreach $item (@dirs) {
if (-d $item) {
push @newDirs, $item;
}
}
to seperate the directories, but all I get is the "." and ".." directories.
What can I do to read all of the directories and files and tell the
difference between them.
Thanks in advance
Mike Needham
------------------------------
Date: Sat, 25 Jul 1998 13:00:17 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: HERE assignment?
Message-Id: <alecler-2507981300170001@dialup-590.hip.cam.org>
In article <Pine.LNX.3.96.980725162929.3846A-100000@server>, Albert
Strasheim <lunglet@genocide.adept.co.za> wrote:
> Hello,
>
> I was wondering if is is possible to assign to a $scalar in the way one
> creates HERE (print <<"EOF";) documents?
>
> Reply to fullung@ilink.nis.za, please.
I may be weird, but when I'm wondering whether something works, I just try it.
Andre
------------------------------
Date: Sat, 25 Jul 1998 02:57:10 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: parsing question
Message-Id: <comdog-2507980257100001@news.panix.com>
Keywords: just another new york perl hacker
In article <1dcou09.2xwi8h1c2wm5xN@bay2-88.quincy.ziplink.net>, rjk@coos.dartmouth.edu (Ronald J Kimball) posted:
> Which has nothing to do with the original point. Assigning a variable
> to another variable by putting it in quotes is superfluous, as in:
>
> $string = "$string2";
well, perhaps some get paid by the keystroke, or get workman's comp
for wrist disorders.
or maybe some just like to annoy Tom C. for some reason.
of course, none of those are a good reason to mangle Perl. :)
--
brian d foy <http://computerdog.com>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
------------------------------
Date: 25 Jul 1998 18:47:08 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: perl as pseudocode
Message-Id: <6pd97c$8tv$1@marina.cinenet.net>
Adam Atkinson (ghira@mistral.co.uk) wrote:
: On 25-Jul-98 00:20:05, Ronald J Kimball said:
:
: >> while ($j!=undef) {
:
: >This is exactly equivalent to ($j != 0), except one of them will give a
: >warning under -w, and one won't. I'll let you figure out which is
: >which. ;-)
:
: Hmm. I don't want to check whether things are 0 because in some of the
: examples I used "0" was an available symbol, and is certainly an
: array subscript in use. So I definitely DO need
: to check for undefinedness.
But the point is that doing '$j != undef' does *not* check that $j is
defined, but rather that it is not equal to zero. != is a numeric
comparison operator, so it 'casts' each side to a number; undef converted
to a number is 0 (with a warning, under -w). To see whether $j is
defined, the rather transparent syntax is 'defined $j'.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Sat, 25 Jul 1998 09:31:21 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Perl Beautifier Page
Message-Id: <MPG.1023a837f2e9153498978b@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <6pcr1r$63k$1@supernews.com> on 25 Jul 1998 14:45:15 GMT,
Snowhare <snowhare@devilbunnies.org> says...
<Snip first part of background babble.>
> On Fri, 24 Jul 1998, Larry Rosler wrote:
> > In article <6panr1$3rt$1@xmission.xmission.com> on 24 Jul 1998 13:38:09
> > - 0600, Snowhare <snowhare@xmission.xmission.com> says...
> > >
> > > It is only irrelevant _if_ your C compiler is POSIX compliant for its
> > > gmtime (I believe somone pointed out that Solaris is not in that
> > > discussion). And if it _is_ compliant, you have an even worse problem
> > > over the long haul because POSIX specs that leap years happen
> > > every 4 years:
> > > *EVERY* 4 years. No year % 100 correction. This means POSIX compliant
> > > gmtime can only be used for dates between 1901 and 2099.
> >
> > In the real world, it can be used only from ~1902 to ~2038. That's
> > quite enough as far as I, at least, am concerned!
<Snip of irrelevant platitudes about the century bug.>
> > > The lack of a
> > > leap second correction also implies that your Epoch will slowly but
> > > surely drift out of sync with real time - even without the leap
> > > year error to toss in an accumulating 24 hour error periodically.
> >
> > Periodically == every 100 years. And those who care about drifting
> > out of sync with real time (by half a minute or so now, and a second
> > more every 18 months on average) should be relying on WWV, not on the
> > internal clock of some computer system or other.
>
> A lot of people do. NTP is quite widespread.
Yes. Them as needs to, pay for it. Others shouldn't have to.
> And small *cumulative* errors have long term consequences. Ever hear
> of the Julian calendar? Now consider that nearly _four hundred years_
> after its 'replacement' with the Gregorian calendar, we *still* are
> dealing with its errors. The POSIX standard is one of them.
>
> > > I would say, overall, POSIX Epoch is a _bad thing_ and to be avoided
> > > when possible.
> >
> > Standards and simplicity are Good Things to most of us, and to be
> > sought when possible.
>
> The value of pi is 3.
> -- Proposed law ("standard") in the Indiana Legislature
Even though I know the value of pi to a zillion decimal places, I use
only as many as are needed to get the job done. In real life (as if you
cared), that means as many as my computer's precision will accommodate.
I can choose the precision to fit the problem. If I *need* a zillion
places, I may need to use a zillion computers to do the computation.
> The Earth is flat.
> -- Widespread belief prior to the 17th century.
One can build lots of enormous structures without accounting for the
curvature of the Earth. Or should you tell all the architects how
*wrong* they are?
> Leap years happen every 4 years.
> -- Julius Caesar 45 BC, POSIX Standard
True for two current lifetimes. Be thankful! (Of all your carping, this
one is trivial to correct, as everyone here is fully aware. But building
tables of past leap seconds into every date/time calculation is not. To
say nothing of future leap seconds!)
> Standards and simplicity are only useful to the degree that
> they are _correct_. Placing hidden errors in standards where
> people can get bit by them without warning is simply _wrong_.
Standards and simplicity are only useful to the degree that
they are _useful_. Placing hidden costs in standards where
people can get bit by them without warning is simply _wrong_.
> > Please spare us this noise in the future.
>
> If you don't like PGP signatures, you are free not to read them.
Rudimentary politeness requires you not to impose your own fetishes upon
those with whom you happen to be visiting.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 25 Jul 1998 11:59:57 -0600
From: snowhare@xmission.xmission.com (Snowhare)
Subject: Re: Perl Beautifier Page
Message-Id: <6pd6et$lnr$1@xmission.xmission.com>
Nothing above this line is part of the signed message.
In article <MPG.1023a837f2e9153498978b@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
>[Posted to comp.lang.perl.misc and copy mailed.]
>
>In article <6pcr1r$63k$1@supernews.com> on 25 Jul 1998 14:45:15 GMT,
>Snowhare <snowhare@devilbunnies.org> says...
><Snip first part of background babble.>
>> On Fri, 24 Jul 1998, Larry Rosler wrote:
>> > In article <6panr1$3rt$1@xmission.xmission.com> on 24 Jul 1998 13:38:09
>> > - 0600, Snowhare <snowhare@xmission.xmission.com> says...
>> > >
>> > > It is only irrelevant _if_ your C compiler is POSIX compliant for its
>> > > gmtime (I believe somone pointed out that Solaris is not in that
>> > > discussion). And if it _is_ compliant, you have an even worse problem
>> > > over the long haul because POSIX specs that leap years happen
>> > > every 4 years:
>> > > *EVERY* 4 years. No year % 100 correction. This means POSIX compliant
>> > > gmtime can only be used for dates between 1901 and 2099.
>> >
>> > In the real world, it can be used only from ~1902 to ~2038. That's
>> > quite enough as far as I, at least, am concerned!
>
><Snip of irrelevant platitudes about the century bug.>
As opposed to the 2038 bug, or the 2100 bug, or the 1900 bug? They are all
_the same bug_: The failure to code for largest accomodatible time range
rather than 'the next decade or so.' And while _YOU PERSONALLY_ may not
have a need for dates before 1902 or after 2038, _a lot of other people
have, do, or will need those dates_. Historians. Scientists. Researchers.
Many others. Not everything people do _right now_ concerns events _right
now_.
>> And small *cumulative* errors have long term consequences. Ever hear
>> of the Julian calendar? Now consider that nearly _four hundred years_
>> after its 'replacement' with the Gregorian calendar, we *still* are
>> dealing with its errors. The POSIX standard is one of them.
>>
>> > > I would say, overall, POSIX Epoch is a _bad thing_ and to be avoided
>> > > when possible.
>> >
>> > Standards and simplicity are Good Things to most of us, and to be
>> > sought when possible.
>>
>> The value of pi is 3.
>> -- Proposed law ("standard") in the Indiana Legislature
>
>Even though I know the value of pi to a zillion decimal places, I use
>only as many as are needed to get the job done. In real life (as if you
>cared), that means as many as my computer's precision will accommodate.
>I can choose the precision to fit the problem. If I *need* a zillion
>places, I may need to use a zillion computers to do the computation.
Ah! So you are saying you would ignore a _bad standard_ in favor of a
_correct value_. Funny that.
>
>> The Earth is flat.
>> -- Widespread belief prior to the 17th century.
>
>One can build lots of enormous structures without accounting for the
>curvature of the Earth. Or should you tell all the architects how
>*wrong* they are?
You mean like the people who built the Golden Gate Bridge? The tops of the
supporting columns are _3 inches_ further apart than their bases. Not a
significant error. Unless your cable is three inches too short.
>> Leap years happen every 4 years.
>> -- Julius Caesar 45 BC, POSIX Standard
>
>True for two current lifetimes. Be thankful! (Of all your carping, this
>one is trivial to correct, as everyone here is fully aware. But building
>tables of past leap seconds into every date/time calculation is not. To
>say nothing of future leap seconds!)
Really? There are _adults alive today_ who that is not true for (they were
born before 1900). There are children alive today whom it _won't_ be true
for (they will live past 2100). Sounds like it isn't true for more than
_one_ human lifetime. And it is _trivial_ to correct a few million
embedded systems? The Y2K people don't seem to think so. It is just
another variation on the Y2K bug (which is more accurately tagged the
'century' bug - as the movie quote goes: It'll be back).
>> Standards and simplicity are only useful to the degree that
>> they are _correct_. Placing hidden errors in standards where
>> people can get bit by them without warning is simply _wrong_.
>
>Standards and simplicity are only useful to the degree that
>they are _useful_. Placing hidden costs in standards where
>people can get bit by them without warning is simply _wrong_.
And, how exactly do people get 'bit' by a standard that _actually gives
the right answer_ rather than one that _gives the wrong answer_? Hmmmm??
You have a very odd definition of 'getting bit'.
>> > Please spare us this noise in the future.
>>
>> If you don't like PGP signatures, you are free not to read them.
>
>Rudimentary politeness requires you not to impose your own fetishes upon
>those with whom you happen to be visiting.
Odd. I don't remember comp.lang.misc.perl as being your personal fiefdom.
Perhaps I should ask _you_ why you are being so rude as to _fail_ to
provide a good digital signature while visiting this newsgroup and _my_
mailbox. (Yes, Virginia, that _is_ sarcasm).
Benjamin Franz
Version: 2.6.2
iQCVAwUBNbodF+jpikN3V52xAQHoygP9FIYswEHz3I26pcPN3e+Tx6FJ2h2n42pz
bwRCD54GDINqmJrBZIHVCFo/X2TzSf+T+KKuPAEX3OlmISJj8WsygwslM6AhGxnM
vFDt0W91ivKKtrbN+flEtu6mrcTHkJU1oh1xCC+CJPVEp6vgY6sNbB4VriANfisj
w/TyxBpo1EY=
=I7y4
-----END PGP SIGNATURE-----
------------------------------
Date: Sat, 25 Jul 1998 02:51:03 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl CGI image and text problem
Message-Id: <comdog-2507980251030001@news.panix.com>
Keywords: just another new york perl hacker
In article <Pine.GSO.4.02.9807242222210.25503-100000@user2.teleport.com>, Tom Phoenix <rootbeer@teleport.com> posted:
> > while (<IMAGE>)
>
> You don't want to read a binary file a line at a time. (Binary files don't
> have lines! :-) You probably could get away with this, but it would be
> better to read() instead.
text files don't have lines either. that's why we fake it by pretending
a certain character means "go to the next line". lines make us feel
warm and fuzzy, but Perl doesn't really care :)
--
brian d foy <http://computerdog.com>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
------------------------------
Date: Sat, 25 Jul 1998 02:46:12 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl with SSI
Message-Id: <comdog-2507980246120001@news.panix.com>
Keywords: just another new york perl hacker
In article <6pamji$geg$1@nnrp1.dejanews.com>, serstad@my-dejanews.com posted:
> I saw a few answers to this post and it surprises me that the answers are so
> complicated. We do this all the time on our server:
you do it all the time with *your* server, which happens to be one of
marginal marketshare servers.
the answers are complicated because a certain code-base doesn't
do that (yet).
--
brian d foy <http://computerdog.com>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
------------------------------
Date: 25 Jul 1998 11:19:07 -0500
From: Ben <ben@sofnet.com>
Subject: Re: perl/mysql connect problem
Message-Id: <35B9BF57.31DA436F@sofnet.com>
HeliSpot,
You might try telnetting in and see if you can 'tickle' it manually
first.
Ben
HeliSpot wrote:
> HELP!!!
>
> Hi folks. I joined a new virtual hosting company last week that
> offers mysql. They verified that my mysql database had been setup,
> then I used their "control panel" web page to create a table and put
> some data in it. (I knew how to do this using SQL commands, but the
> control panel site was easier. Plus, this was just to test out mysql
> anyway.)
>
> So, I wrote this quick script to try to connect to the database, just
> to test it out. I think I have the syntax wrong in the connect->
> line, because any commands after that are non-responsive.
>
> Any thoughts?
>
> ------------------
> #!/usr/bin/perl
>
> print "Content-type: text/html\n\n" ;
> print "<html>";
> print "<head>";
> print "<title>test page</title>";
> print "<body>";
>
> use Mysql ;
> print "use mysql line succeeded.<br>\n" ;
>
> # the following four items were provided by the host ;
> # I changed them here for privacy reasons ;
>
> $host = "sqlserver.net" ;
> $database = "mydatabasename" ;
> $user = "myuserid" ;
> $password = "mypassword" ;
>
> $dbh = Mysql->Connect($host,$database,$password,$user);
> print "mysql connect line succeeded.<br>\n" ;
>
> # nothing happens after this point when I run the script ;
> # on the server ;
> # also, I tried removing the next two lines because ;
> # I technically connected above, but it still doesn't ;
> # work even then... ;
>
> $dbh->SelectDB($database);
> print "selectdb line succeeded.<br>\n" ;
>
> $sth = $dbh->ListTables ;
> while (@row = $sth->fetchrow) {
> print "@row<br>\n" ;
> }
>
> print "</body></html>\n\n" ;
>
> ---------------------
>
> Thoughts?
>
> Alex
> alex at helispot dot com
> NO SPAM!!
------------------------------
Date: Sat, 25 Jul 1998 18:45:55 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: problem with NS cookies
Message-Id: <35ba2734.152171018@news2.cais.com>
Francoise Leduc <leduc@kazibao.net> Said this:
>yes it's PERL problem !!! my problem is that I can't modify a javascript
>cookie with PERL when the client browser is Netscape...
>Any solution ?
Read up on cookies. There should be no reason why you can't handle a
cookie from one browser to another. My suspicions are that you are a
"explorer-centric" person who only knows how to deal with things in
explorer's quirky ways.
But, this is definately not a perl question. While you may wish to
use perl to do this, the error is in your method, not the language.
Find out how to handle a cookie, and as long as the script that wants
to manipulate the cookie is on a domain that the cookie was created
from, you shouldn't have any problems whether the cookie was created
by another script, javascript or even the web server itself.
Try looking at Matt Wright's cookie-lib.pl library to see how he
handles cookies.
------------------------------
Date: Sat, 25 Jul 1998 12:47:18 -0400
From: "Mr.Pink" <davefish@draughnconclusions.com>
Subject: Re: Recent Secret Government Experiments Killing People!!!
Message-Id: <6pd2ek$lun@news2.snet.net>
Avoid the controlling brainwaves.....wrap aluminum foil around your head to
ward off the vicious government rays penetrating your soft skull. I
reccoment the heavier guages of a well known brand, since some cheaper
brands don't have the radiation deflecting capacity of the good stuff.
Holding a wad of it in your mouth at the same time prevents stray rays from
penetrating the roof of your mouth and entering your swollen, glistening
brain, forcing you to DO things for THEM. Lining the walls of your house
with foil will not only give you a fantastic futuristic domicile, but will
allow you to remove your foil cap and mouth ball in your home without fear
of government brain signal domination. And guys, the foil cup is a must to
prevent government access to your testes, because we know that is really all
they are after: control of your testicles. Fight the good fight, you crazy
bastards!
------------------------------
Date: Sat, 25 Jul 1998 19:57:45 +0100
From: "]hex[" <hex@cyberdude.com>
Subject: Re: Recent Secret Government Experiments Killing People!!!
Message-Id: <35BA2AA9.7A586B3D@cyberdude.com>
blowclinton@my-dejanews.com wrote:
> The computer basically maps out your brain,
> catalogs symbolic speech you use to interpret symbols, and traps your
> electromagnetic field in a field. Your every thought becomes like
> spoken
> word for researchers to "hear" thought as it forms. Dreams are no
> longer
> produced by your own bioelectric firings of neurons in your brain, but
> by a
> grad student at a computer terminal watching and adding input to the
> dream...making every dream a lucid dream.
>
> -----== Posted via Deja News, The Leader in Internet Discussion
> ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member
> Forum
anyone know were i can get one to use on my wife?
hex
General protection fault is copyright Microsoft
------------------------------
Date: Sat, 25 Jul 1998 19:31:17 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Recent Secret Government Experiments Killing People!!!
Message-Id: <35ba30e3.154647824@news2.cais.com>
"Daniel (dS=dQ/T) Key" <daniel@all-keys.demon.co.uk> Said this:
>
>blowclinton@my-dejanews.com wrote in message
><6pc4eu$32r$1@nnrp1.dejanews.com>...
>>Okay...
>>
>>A friend of mine, whose identity must remain anonymous has agreed for me to
>>let everyone know what she has seen.
>>
>>
>>---------
>>
>>
>>Remember the SR-71, created and operational in the 1950's and de-classified
>>in the 1990's??? In 1950, conventional science and technology could never
>>have designed the SR-71, yet a SUPER SECRET facility out in the Nevada
>desert
>>was it's birthplace. This technology in 1950, quote "did not exist"
>unquote.
>> Any sighting of the SR-71 was excused as fantasy and the product of
>>hallucinations.
> ------------- snip----------------
>
>
>OK, I've read this post three times and it still makes minimal sense, but I
>have a question for the voices in your head. What is it about the SR-71 that
>could not have been built in the late 60's-early 70's (when it was
>*actually* designed/constructed) ?
>--
I suppose this person is not very proficient in the science of
constructing a plausible conspiracy theory.
If you have done even a minimal amount of research on the SR-71 or the
U2, for that matter, you can gain some very real knowledge of a
as-of-yet unclassified technology.
To try to claim that it was some kind of "alien" or extra-terrestrial
technology is ridiculous. Yes, it is amazing to consider that the guy
that designed the plane, at the skunk works facility, did create an
amazing plane using basically just a slide-rule. However, that's not
testament to alien knowledge. It's a testament to the power of the
human brain (and gobs of cash from the government).
If it was created by a superior intelligence, then how come they still
haven't solved the one major problem with the plane, which is that
they do not have a material pliable enough to expand and contract
evenly - the plane had to be constructed with large gaps in the fuel
tanks, so much so that it HAS TO refuel after take off because it
leaks so much fuel that by the time it is airborne the tanks are
practically empty. How come our friendly extra-terrestrial
aeronautics consultant couldn't share the solution to that problem?
------------------------------
Date: Sat, 25 Jul 1998 19:35:15 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Recent Secret Government Experiments Killing People!!!
Message-Id: <35ba3288.155068939@news2.cais.com>
blowclinton@my-dejanews.com Said this:
>Okay...
>
>A friend of mine, whose identity must remain anonymous has agreed for me to
>let everyone know what she has seen.
>
>
>---------
>
>
>Remember the SR-71, created and operational in the 1950's and de-classified
>in the 1990's??? In 1950, conventional science and technology could never
>have designed the SR-71, yet a SUPER SECRET facility out in the Nevada desert
>was it's birthplace. This technology in 1950, quote "did not exist" unquote.
> Any sighting of the SR-71 was excused as fantasy and the product of
>hallucinations.
Okay, so we try to establish credibility here, by trying to use the
"if they deny it exists, then it most definitely must exist" defense.
>
>The computer is highly classified and is being used by researchers involved
>with the study of "NON LETHAL WEAPONRY". Please do not let the term "non-
>lethal" fool you. This technology is highly lethal.
>
>It is funded by the I.R.S. and funneled through to the United Nations.
>Russian, British and American Scientists have worked years to bring this
>project to fruition. Churches have been heavily involved with the
>development of this weaponry since they feel they could become a target as
>well. The computer made it's debut in 1991, right after the Gulf War when
<snip>
This is a very bad first attempt at fiction. None of what you said
here is even connected. First, it's the IRS, then it's the UN, then
it's the churches, now it's some grad student, and then it's just some
alien technology.
Your thoughts are not logically structured, the concepts you present
don't ever quite make any sense.
Go back to the drawing board and try harder at concocting a more
convincing story. And stop taking LSD, while it certainly isn't an
entirely harmful substance, it does cause a certain disconnection from
reality.
------------------------------
Date: Sat, 25 Jul 1998 19:00:34 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: seek file
Message-Id: <35ba2852.152456632@news2.cais.com>
"gpsingh@mailcity.com" <gpsingh@mailcity.com> Said this:
>Hi,,
>I want to open a file , reach the file at a particular pattern and then
>do manipulation on the file from there on.
>For example i want to open a log file, reach today's date ,forget about
>the data before the date and then work on the lines after that date.
>How to do that?
Someone else may have a better solution, but if your log files are
relatively consistent, meaning they generally produce the same amount
of lines of data per day/hour/whatever, then you could just use
tail -nn logfilename
to extract the last nn lines of the log file, then use a comparison on
the date/time stamp on each line to junk any that aren't within the
date you want to look at. I know it's not very "eloquent", but it
works if you can't come up with a better way.
i.e, to get the last hour's web accesses from access_log:
#!/bin/sh
tail -11000 access_log >temp_log
perl_parsing_script
rm temp_log
It's kludgy, but it will work. 11,000 is just an arbitrary number for
this example, it seems to work to grab the last hour's accesses on a
server that logs about 250,000 hits a day. Figure, a rough, probably
not-so-perfect equation to figure how many lines you need to get the
last hour's accesses, then round it up liberally to allow for
fluctuations.
(average number of hits per day) / 24
I use it on some scripts.
I suppose you could use seek() and tell() in an initial run through
the file, until you hit the first instance of a specified date or
time, and then close the file and then from there use reopen it and
use seek() to continue, but at that point you might as well just
continue through the same open() filehandle since you've already run
through the "meat" of the file reading overhead.
Actually, my solution may actually be the best solution in the case of
multi-megabyte log files, depending on how well tail handles it's
duties - ie, if it actually just "reads backwards" from a file, it's
probably fairly efficient, as it avoids looping through the first
10,000,000+ lines to get to the last 10,000 lines, for example.
Or you could just undef $/ and then slurp the entire file into a
scalar, but that'll eat up ram pretty quick on large log files.
>
>TIA
>GP
>PS : Please respond me at gsingh@exodus.net
>
Nope, post on usenet, read usenet.
------------------------------
Date: 25 Jul 1998 18:51:37 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Simple (I hope) Apache/NT/Perl question
Message-Id: <6pd9fp$8tv$2@marina.cinenet.net>
Mark Hickey (Mark.Hickey@veritas.com) wrote:
: Hate to bother with with this one, but I am atumped. I installed
: apache 1.3.1 on mt NT 4.0 box, and put some scripts in the cgi-bin
: directory. I editted srm.conf to contain ScriptAlias /cgi-bin/
: d:/programs/apache/cgi-bin/.
: Yet when I try to invoke a script, I get the message
[snip]
Posting the same off-topic question four times does not make it any more
topical. This is *very* clearly a server question, not a Perl question.
In all honesty, what in the world made you think that this newsgroup was
the right place to ask? Why not a CGI newsgroup, or a server newsgroup,
or Apache tech support, or...?
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: 25 Jul 1998 14:42:43 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: symbolic links for windows
Message-Id: <ltd8atn55o.fsf@asfast.com>
Tom Phoenix <rootbeer@teleport.com> writes:
> On Wed, 22 Jul 1998, Anandan Balaji wrote:
>
> > I am writing some scripts, which has to run on both unix and windows
> > platforms.
> > Any idea about how to take care symbolic links? Any work arounds?
>
> Install Linux. :-) Seriously, if you need symbolic links, you need a
> system which supports them. If you don't, why are you asking? (Okay, so I
> have trouble being serious sometimes. :-)
You (Anandan Balaji) didn't specify which windows platforms you're
using, but if it's Windows NT, links are available on NTFS partitions.
I believe that you get both symbolic and "hard" links.
I'm not sure, however, if the Windows' ports of Perl properly handle
links on NTFS partitions.
--
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: Sat, 25 Jul 1998 21:45:15 GMT
From: jkirving@mosquitonet.com (Ken Irving)
Subject: Re: Tcl is better than Perl
Message-Id: <35ba365d.8366470@news.mosquitonet.com>
On 25 Jul 1998 13:57:09 GMT, Tom Christiansen <tchrist@mox.perl.com>
wrote:
...
>
>Really? Gosh, this seems easy to me:
>
> use IO::Socket;
> $remote = IO::Socket::INET->new("localhost:13")
> || die "cannot connect to daytime port at localhost";
> while ( <$remote> ) { print }
>
>Is there an easier way to do this?
Presumably I'm missing something, but I get an error:
Odd number of elements in hash list at C:\PERL\lib/IO/Socket.pm line
130.
when running this script under 5.004_02 on winnt, and 5.004_01 on
linux.
-- ken
>
>--tom
>--
>There's going to be no serious problem after this. --Ken Thompson
------------------------------
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 3254
**************************************