[9662] in Perl-Users-Digest
Perl-Users Digest, Issue: 3256 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jul 26 07:17:15 1998
Date: Sun, 26 Jul 98 04:02:21 -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 Sun, 26 Jul 1998 Volume: 8 Number: 3256
Today's topics:
Re: Date Question... (Larry Rosler)
Re: Date Question... <jwb79@mail.idt.net>
Re: Date Question... (Larry Rosler)
Re: Detecting Countries <nexes@epix.net>
Re: future date in epoch time (Neil Kandalgaonkar)
having problems reading STDIN <REPLY_TO_damonbrent@earthlink.net>
Re: newbie string questions. (Larry Rosler)
Question darrensw@pacbell.net
Re: Question (Neil Kandalgaonkar)
Reacting to 1 of 10 or so possible values.... Need some (BullDog USMC)
Re: Reacting to 1 of 10 or so possible values.... Need <minich@globalnet.co.uk>
Re: Recent Secret Government Experiments Killing People <byzanthium@mailcity.com>
Re: Recent Secret Government Experiments Killing People <majestik_12@hotmail.com>
Re: Recent Secret Government Experiments Killing People <majestik_12@hotmail.com>
Re: Recent Secret Government Experiments Killing People <majestik_12@hotmail.com>
Re: Recent Secret Government Experiments Killing People <majestik_12@hotmail.com>
Re: Recent Secret Government Experiments Killing People <majestik_12@hotmail.com>
Script Security Problem (Stu)
Sort darrensw@pacbell.net
Re: Tcl is better than Perl (Cameron Laird)
Re: Timeout, Socket, Windows (-)
Using the hash (lloyd)
Re: Using the hash <ben@sofnet.com>
Re: Web mail script <devnull@interlog.com>
win32 printing (Neil Kandalgaonkar)
Re: Y2K problem in PERL with localtime() (I R A Aggie)
Re: Y2K problem in PERL with localtime() (John Stanley)
Re: Y2K problem in PERL with localtime() (Larry Rosler)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 25 Jul 1998 22:42:26 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Date Question...
Message-Id: <MPG.102461994ef6bcea98978f@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <6pe3s8$a49$4@client3.news.psi.net> on 26 Jul 1998 02:22:00
GMT, Abigail <abigail@fnx.com> says...
...
> Ah, but leap seconds happen at midnight!
>
> $ perl -MTime::JulianDay -wle '$, = ", ";
> print inverse_julian_day (local_julian_day (time) - 1)'
> 1998, 7, 24
As another thread (rather mysteriously called Re: Perl Beautifier Page)
has dealt with ad nauseam, leap seconds do not exist in the Unix epoch.
If the modules think so, they are wrong.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 26 Jul 1998 06:23:31 GMT
From: "Jim Babbington" <jwb79@mail.idt.net>
Subject: Re: Date Question...
Message-Id: <01bdb85c$d9ee0a40$6488fdc7@dixon>
M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote in article <6pb4k3$2kd$1@pegasus.csx.cam.ac.uk>...
: Brent Michalski <perlguy@technologist.com> wrote:
: >Try this:
: >
: >$yesterday = localtime((time-86400));
: >print $yesterday;
:
: Wrong. Not all days have 24 hours.
Ok, I'm a big baseball fan, and I always remember to set my alarm clock ahead 1 hour right before I go to bed on the eve of the
first sunday in April.
However, my computers do this automatically (MS/NT, Solaris, OS/400).
I would think that if the machine adjusted the time correctly, this calculation would yield the same results ( 3:00a - 24hours =
3:00a of the previous day).
Am I wrong about this?
------------------------------
Date: Sun, 26 Jul 1998 00:09:06 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Date Question...
Message-Id: <MPG.102475ee9457ae41989793@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <01bdb85c$d9ee0a40$6488fdc7@dixon> on 26 Jul 1998 06:23:31
GMT, Jim Babbington <jwb79@mail.idt.net> says...
> M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote in article <6pb4k3$2kd$1@pegasus.csx.cam.ac.uk>...
> : Brent Michalski <perlguy@technologist.com> wrote:
> : >Try this:
> : >
> : >$yesterday = localtime((time-86400));
> : >print $yesterday;
> :
> : Wrong. Not all days have 24 hours.
>
> Ok, I'm a big baseball fan, and I always remember to set my alarm clock
> ahead 1 hour right before I go to bed on the eve of the first sunday in April.
> However, my computers do this automatically (MS/NT, Solaris, OS/400).
> I would think that if the machine adjusted the time correctly, this
> calculation would yield the same results ( 3:00a - 24hours =
> 3:00a of the previous day).
>
> Am I wrong about this?
Yes, you are wrong about this. You would be right if the request
had to do with gmtime. But 86400 seconds is not one *local* day -- it is
24 hours. If the *local* day in question had 23 or 25 hours, the
resulting local time would indeed be off by one hour, as M.J.T. Guy said.
I posted the way to eliminate this bug earlier today. It is based on a
few lines of code that determine the current offset of localtime from
gmtime directly (i.e., by consulting the functions themselves, and not
the environment). I don't know if a similar function is in any of the
popular date/time modules, which I have not used. If it isn't, perhaps
it should be added.
BTW, your newsreader is not wrapping text lines properly. I adjusted the
quotes above manually.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sat, 25 Jul 1998 23:46:28 -0400
From: "Chris" <nexes@epix.net>
Subject: Re: Detecting Countries
Message-Id: <6pe8rv$av0$1@news1.epix.net>
>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.
My thoughts exactly.
The reason this would be so useful is that many shareware distributors will
only list your program if you have a link to directly download. They will
not allow you go though an additional page.
Just to be on the safe side I limited the shareware version's password size
to four bytes though.
Maybe I could get some information on this from same place that domain names
are registered.
Thanks for your input
- Chris
------------------------------
Date: 26 Jul 1998 01:14:41 -0400
From: yuiop@smelt.openface.ca (Neil Kandalgaonkar)
Subject: Re: future date in epoch time
Message-Id: <6pee01$4jq@smelt.openface.ca>
In article <6p9r9g$oqn$1@nnrp1.dejanews.com>,
<sjborden@my-dejanews.com> wrote:
>Does anyone have any ideas how to take a future date (i.e. 12/31/98) and
>convert it to epoch time?
>
It's in the FAQ. See http://www.perl.com/ or type perlfaq4.
------------------------------
Date: Sun, 26 Jul 1998 00:49:19 -0400
From: "Brent Verner" <REPLY_TO_damonbrent@earthlink.net>
Subject: having problems reading STDIN
Message-Id: <6pecd0$51e$1@ash.prod.itd.earthlink.net>
in the following code ---
#(not *exactly*, but this will some idea of what is going on)
binmode(STDIN);
binmode(STDOUT);
binmode(STDERR);
while(<STDIN>)
{
read STDIN, $buffer, 4096, length($buffer);
# do some tests on $buffer
# if i want to write it all $write = $buffer
# if i only want to write part of it, $write = (what i want to
write)
# and $buffer = (what i want to add the next read to)
# set $close_newfile = 1 if i'm done writing
unless ($file_is_open)
{
open (NEWFILE, ">$path_to_file") || &handle_error;
binmode(NEWFILE);
$file_is_open = 1;
}
print NEWFILE "$write" if $file_is_open;
close(NEWFILE) if $close_newfile;
}
--- i am having problems getting all of the STDIN. specifically, the read
STDIN doesn't pick up where it stopped reading -- it picks up *well beyond*
the last read position. i can use 'tell' and 'seek' to fix this problem on
a UNIX based system, but the fix doesn't work on my local (win98) win32
setup, so i'm back where i started. why does the file pointer get moved
around? if i read the whole STDIN at once, i have no problems, but the
STDIN may be very large, so i need to use a buffer to process the STDIN.
shouldn't the file pointer stay where i left it from the last read, or is
the observed behavior normal? or are there things that might inadvertently
cause STDIN's file pointer to be moved forward (like other file operations)?
any suggestions on how to glue the filepointer in place would be
appreciated.
tia,
brent
------------------------------
Date: Sat, 25 Jul 1998 23:05:41 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: newbie string questions.
Message-Id: <MPG.10246710bd35a2a989790@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <6pe26k$jca$1@camel29.mindspring.com> on Sat, 25 Jul 1998
21:51:45 -0400, Scott <sdh1@anchor.hotmail.com> says...
> Well, to get to you before the RTFM crowd.
>
> $para = "See Dick run. See Jane run. Run Dick run. Run Jane Run";
> $para =~ s/^(.*\.).*$/$1\./;
>
> However, if $para = "Rob Peter to pay St. Paul. The dog ate the cat."
> you will end up with "Rob Peter to pay St.".
No you won't. Even if you put a semicolon on that line. Did you try it?
Did you try the first line?
As a matter of common courtesy to the poster of a question and to the
newsgroup, you should not post untested code (at least not without a
warning to look out for total bogosity).
> Get a good book on regular expressions. Or, at least get a good perl book
> with a chapter on the subject. If you are on some flavor of Unix, print out
> the man page for regexp and read through it.
*You* should do that first. RTFM yourself!
(In case you need a hint, there are two -- count them -- two independent
errors and four independent superfluities in your one-line substitution.
You may be in contention for an Olympic record.)
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sun, 26 Jul 1998 04:37:23 GMT
From: darrensw@pacbell.net
Subject: Question
Message-Id: <35bab22e.34451799@news.pacbell.net>
I have a script which generates lines of lets say products.
This list can get quite long.
Any ideas where i can find the code to have a max number of lines and
then links to the next x number of items.
Thanks,
Darren
------------------------------
Date: 26 Jul 1998 02:10:35 -0400
From: yuiop@smelt.openface.ca (Neil Kandalgaonkar)
Subject: Re: Question
Message-Id: <6peh8s$6ak@smelt.openface.ca>
In article <35bab22e.34451799@news.pacbell.net>, <darrensw@pacbell.net> wrote:
>I have a script which generates lines of lets say products.
>
>This list can get quite long.
>
>Any ideas where i can find the code to have a max number of lines and
>then links to the next x number of items.
I assume from your use of 'links' that this is a CGI question.
For examples of this, I would suggest script archives, like
www.cgi-resources.com. Look in the Perl/Searching section, search programs
tend to have this feature. CGI-resources lists a whole lot of really
terrible scripts too, so look at a few to see which is best.
------------------------------
Date: Sun, 26 Jul 1998 02:47:36 GMT
From: bulldog@usmc.net (BullDog USMC)
Subject: Reacting to 1 of 10 or so possible values.... Need some streamlining help.
Message-Id: <35ba8c11.949828@enews.newsguy.com>
Hello.
I have a script that accepts <so far> about 10 different 'request
types'.
Right now, I am handling this by doing the clumsy:
if ($reqType eq "typeOne"){
...set up environment...
...execute routine(s)...
exit;
}
if ($reqType eq "typeTwo"){
...set up environment...
...execute routine(s)...
exit;
}
Et cetera...
The problem is that each IF statement is getting more and more
complex.
Are there any suggestions on how to streamline this handling?
------------------------------
Date: Sun, 26 Jul 1998 10:49:17 +0100
From: "Martin" <minich@globalnet.co.uk>
Subject: Re: Reacting to 1 of 10 or so possible values.... Need some streamlining help.
Message-Id: <6peu48$n8t$1@heliodor.xara.net>
You could do:
if ($reqType eq "typeOne"){
...set up environment...
...execute routine(s)...
}
elseif ($reqType eq "typeTwo"){
...set up environment...
...execute routine(s)...
}
elseif ($reqType eq "typeTwo"){
...set up environment...
...execute routine(s)...
}
elseif ($reqType eq "typeTwo"){
...set up environment...
...execute routine(s)...
}
etc.
>Are there any suggestions on how to streamline this handling?
This depends on what the actual routines are as to whether you
could combine then better.
Martin
------------------------------
Date: Sun, 26 Jul 1998 08:34:08 GMT
From: "WhySp" <byzanthium@mailcity.com>
Subject: Re: Recent Secret Government Experiments Killing People!!!
Message-Id: <4SBu1.2471$Nx1.984993@newsfeed.slurp.net>
you know... come to think of it this is the best string we had here for a
couple of days...
at least it got some info out there...fiction or whatever....
sad isn't it?
------------------------------
Date: Sun, 26 Jul 1998 02:35:51 +0100
From: "Firestarter" <majestik_12@hotmail.com>
Subject: Re: Recent Secret Government Experiments Killing People!!!
Message-Id: <6pf05o$uu014@scotty.tinet.ie>
ahh thank god for offline NG reading
found it!!!
http://www.bigscience.com/setiathome.html
their is contact details their
i think you have to subscribe although it is more than likely free (worth a
look anyway) in order to get the screen saver,which probably works online
only and i doubt much people would let their puter be on its screen saver
while being online for long
also if you are very interested in this get in touch with progect Argus,the
backyard SETI project
you can find out more about this at
http://www.setileague.org/general/whargus.htm
ICQ UIN: 6036731
phie site: http://dac.org/users/phie/right.html
phie zine: http://phiezine.zeris.net/
IRC: #hackers_ireland,#hackerzlair,#2600-uk.
The Lion King wrote in message <#XjHR49t9GA.308@upnetnews03>...
>
>Firestarter wrote in message <6pc7q0$ivd9@scotty.tinet.ie>...
>>they are still trying though and are making most of their money through
the
>>internet from people interested,you can get a screen saver that lets you
>see
>>frequencies on your screen.
>
>
>OK, i looked everywhere i could think of. Any URLs for this screensaver?
>
>
------------------------------
Date: Sun, 26 Jul 1998 02:39:45 +0100
From: "Firestarter" <majestik_12@hotmail.com>
Subject: Re: Recent Secret Government Experiments Killing People!!!
Message-Id: <6pf05p$uu015@scotty.tinet.ie>
interesting but what if the things they are building (if they still
are,after all the media hype after bob lazar bulshit story) is really just
inventions stole from ETs (i can hear the flames,but am ready for them) in
1947 onward?
--
ICQ UIN: 6036731
phie site: http://dac.org/users/phie/right.html
phie zine: http://phiezine.zeris.net/
IRC: #hackers_ireland,#hackerzlair,#2600-uk.
The Lion King wrote in message ...
>>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) ?
>
>
>
>The SR-71 used a large number of microprocessors or a level which we have
>only just achieved in the last few years. The design of the SR-71 in itself
>was revolutionary. This design point alone cannot finalise the argument but
>it does raise a few eyebrows. It used technologies which were only
>"developed" during the late 80's and 90's...
>Also, there are a few materials used in the construction of the SR-71 which
>were not available in the 50's and 60's... (mainly complex
poly-hydrocarbons
>and a variety or bipolymers)... someone of which STILL cannot be identified
>today because they are simply something that we've never seen before and
>might not do for a long time.
>
>
>The counter argument to this is that hidden deep in Area51 are people who
>are so smart, they've created the technologically most advanced
civilisation
>on the planet there. They've developed things which we cannot even
>comprehend yet... All very feasible and all very possible...
>
>
------------------------------
Date: Sun, 26 Jul 1998 02:49:13 +0100
From: "Firestarter" <majestik_12@hotmail.com>
Subject: Re: Recent Secret Government Experiments Killing People!!!
Message-Id: <6pf05q$uu016@scotty.tinet.ie>
true
amazing what scientists can do with money
is anyone familar with Nikola Tesla?
a man totally ahead of his time
he was able to use electricity in a controllable form and without him we may
be in the dark ages
like many other people like him he was ridiculed mainly because people
couldnt yet grasp his way of thinking,he made a Tesla coil
a rod which is supposed to create earthquakes,he has rumoured to be the
cause of many earthequakes in his time and again if anyone knows about Aum
Shinryko the japanese cult that gassed the tokyo subways with sarin gas they
will know that Aum members were testing a remake of the tesla coil in the
desert which was never prooven cos Nicola was stoped and became a hermit
towards the end of his life before proveing his invention
only now is he apretiated
ive gone out on a limb here but my main point is not to assume that it is of
ET origin just because someone is ahead of their years
--
ICQ UIN: 6036731
phie site: http://dac.org/users/phie/right.html
phie zine: http://phiezine.zeris.net/
IRC: #hackers_ireland,#hackerzlair,#2600-uk.
- wrote in message <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: Sun, 26 Jul 1998 02:52:29 +0100
From: "Firestarter" <majestik_12@hotmail.com>
Subject: Re: Recent Secret Government Experiments Killing People!!!
Message-Id: <6pf05r$uu017@scotty.tinet.ie>
new id see one of these type posts
its sad to see it coming from someone you would assume would be open minded
the original post was "holywoodized" but its actual fact so dont take the
piss please
--
ICQ UIN: 6036731
phie site: http://dac.org/users/phie/right.html
phie zine: http://phiezine.zeris.net/
IRC: #hackers_ireland,#hackerzlair,#2600-uk.
Mr.Pink wrote in message <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: Sun, 26 Jul 1998 02:55:46 +0100
From: "Firestarter" <majestik_12@hotmail.com>
Subject: Re: Recent Secret Government Experiments Killing People!!!
Message-Id: <6pf05s$uu018@scotty.tinet.ie>
id liketo draw peoples attention to a facinating site i found
it is certainly not what i would use to defent the "we are not alone"
opinion
but nevertheless the guy who does most of the talking if a looney has an
amazing outlook on life
and reality as we know i
its very big but tell me what you think:
http://www.station1.net/douglasjones/aconvers.htm
--
ICQ UIN: 6036731
phie site: http://dac.org/users/phie/right.html
phie zine: http://phiezine.zeris.net/
IRC: #hackers_ireland,#hackerzlair,#2600-uk.
- wrote in message <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: Sun, 26 Jul 1998 04:52:06 GMT
From: sbrowne@iinet.net.au (Stu)
Subject: Script Security Problem
Message-Id: <35bab328.5558995@news.m.iinet.net.au>
This is driving me nuts! Someone, anyone, please help.
I've got a shopping cart script which is functioning perfectly besides
this problem; when the user enters secure mode, the browser recognises
that it's in a secure mode, reports that all files were encrypted,
blue key, padlock etc. However, if you check the document/security
info, the security status is "unknown".
I made an html page directly from the code the script generated and
tried displaying this on the secure server. No problems, security
grade displayed, certificate displayed, everythings fine. So why can't
I get the browser to recognise the security certificate from script
generated pages??!!
Platform: NT5, MS IIS, Perl 5
Certificate: Medium grade (US Export), RSA.
Thanks in advancve - Stu
------------------------------
Date: Sun, 26 Jul 1998 04:41:59 GMT
From: darrensw@pacbell.net
Subject: Sort
Message-Id: <35bab2f6.34652056@news.pacbell.net>
Hi, I have the following code which allows me to sort by file name.
foreach $key (sort keys %category) {
opendir THEDIR, "$basepath$key" || die "Unable to open
directory: $!";
@allfiles = readdir THEDIR;
closedir THEDIR;
foreach $file (sort { int($a) <=> int($b) }@closetime) {
if (-T "$basepath$key/$file") {
open THEFILE, "$basepath$key/$file";
($title, $reserve, $inc, $desc, $image, $gmtime, @bids) =
<THEFILE>;
close THEFILE;
chomp($title, $reserve, $inc, $desc, $image, $gmtime, @bids);
@lastbid = split(/\[\]/,$bids[$#bids]);
$file =~ s/\.dat//;
@closetime = gmtime($file);
$closetime[4]++;
Within the file there is a date function, how can I amend the search
to search by the date?
Thanks,
Darren
------------------------------
Date: 26 Jul 1998 05:57:44 -0500
From: claird@Starbase.NeoSoft.COM (Cameron Laird)
Subject: Re: Tcl is better than Perl
Message-Id: <6pf238$2s6$1@Starbase.NeoSoft.COM>
In article <6pco7l$94j$1@csnews.cs.colorado.edu>,
Tom Christiansen <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting sent to cited author via email]
>
>In comp.lang.perl.misc,
> claird@Starbase.NeoSoft.COM (Cameron Laird) writes:
>:Actually, writing a very simple client-server pair
>:is one of the tasks where Tcl happens to be a lot
>:friendlier to beginners than Perl.
>
>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?
.
.
.
No, and I thank you for asking. It gives me the opportunity
to refine what I wrote earlier. What I should have said is
this: many Perl beginners first encounter the raw socket
interface (by way of, for example, the section headed "Inter-
net TCP clients and servers" in the camel book), which
needlessly complicates their lives compared to the Socket::INET
or base Tcl APIs.
There's likely another cultural issue afoot here. In your
follow-up nearby to Ken Irving, you let him know that the
four-line script above works for you with particular versions
of Perl and Socket installed. I take it that you mean for a
second message to be implicit, but I can't intuit your con-
vention. Is it
and you ought to be using these versions also
or
it works for me, and I'm indifferent to your
success with it
?
Thanks again for posting this nice example of a minimal TCP/IP
client.
--
Cameron Laird http://starbase.neosoft.com/~claird/home.html
claird@NeoSoft.com +1 713 996 8546 FAX
------------------------------
Date: Sun, 26 Jul 1998 05:40:03 GMT
From: d@d.cmm (-)
Subject: Re: Timeout, Socket, Windows
Message-Id: <Tizu1.1755$DI5.9148603@news.rdc1.az.home.com>
In article <ubuu1.1238$DI5.9026379@news.rdc1.az.home.com>, d@d.cmm (-) wrote:
>Greetings all,
>
>I'm doing it again, trying to use a UNIX language on Windows.
>
>I have written a variaty of small servers and clients to do many things, but I
>can't controll the timeouts on read() and write(). I would gladly use a fork()
>and an alarm, but Windoz doesn't support the fork(), surprise.
>
>I understand that the socket has this option available, and that many folks
>have handled this succefully with things like vec(), but I can't seem to find
>clear documentation on what vec() does or how to actually set or get socket
>options. ie; getsockopt() or setsockopt().
>
>I don't neccasarily need an answer on what to do, although it would be nice.
>What I do need is a source of learning.
>
>Thanks in advance,
>Rodney Broom
PS, Responses in the group or via e-mail are great.
broomer2@primenet.com
------------------------------
Date: 26 Jul 1998 05:04:14 GMT
From: lloyd007@best.com (lloyd)
Subject: Using the hash
Message-Id: <lloyd007-2507982219070001@lloyd007.vip.best.com>
I am trying to use a hash to store a table with names and passwords as an
exercise in learning perl. I am having trouble though starting right away
with this part of the code:
#!/usr/bin/perl5 -w
%words = qw(
lloyd lloyd
leanne loon
tom" kennedy
);
Everytime I try to check the program it tells me greets me with this message:
"qw" may clash with future reserved word at password.cgi line 3syntax
error in file password.cgi at line 3, next 2 tokens "qw("
password.cgi had compilation errors.
When I remove the qw I still get an error message even after I restore the
quote marks around the items in table? Can anyone help?
Thanks
Lloyd Francis
lloyd007@best.com
------------------------------
Date: 26 Jul 1998 00:39:12 -0500
From: Ben <ben@sofnet.com>
Subject: Re: Using the hash
Message-Id: <35BA7AE2.6D05F2F3@sofnet.com>
Llyod,
Might want to do something about that strange little " after tom" in your hash.
It could be the culprit.
Ben
lloyd wrote:
> I am trying to use a hash to store a table with names and passwords as an
> exercise in learning perl. I am having trouble though starting right away
> with this part of the code:
>
> #!/usr/bin/perl5 -w
>
> %words = qw(
> lloyd lloyd
> leanne loon
> tom" kennedy
> );
>
> Everytime I try to check the program it tells me greets me with this message:
>
> "qw" may clash with future reserved word at password.cgi line 3syntax
> error in file password.cgi at line 3, next 2 tokens "qw("
> password.cgi had compilation errors.
>
> When I remove the qw I still get an error message even after I restore the
> quote marks around the items in table? Can anyone help?
>
> Thanks
> Lloyd Francis
> lloyd007@best.com
------------------------------
Date: Sun, 26 Jul 1998 02:11:26 -0400
From: Gordon Blair <devnull@interlog.com>
To: endymion@my-dejanews.com
Subject: Re: Web mail script
Message-Id: <Pine.BSI.3.96r.980726015341.4821A-100000@shell1.interlog.com>
hi;
the imp does this, and it is wonderful to use. it is at:
http://osmos.ml.org/projects/imp
it really is fun, try it, and hey the GNU price-tag can't be beat. this is
a 'real' ala hotmail (your terms) web-mail interface.
g
On Fri, 24 Jul 1998, it was written:
> Date: Fri, 24 Jul 1998 07:50:56 GMT
> From: root.noharvest.\@not_even\here.com (-)
> Newsgroups: comp.lang.perl.misc
> Subject: Re: Web mail script
>
> endymion@my-dejanews.com Said this:
>
> >In article <6p603t$nak@bgtnsc02.worldnet.att.net>,
> > "Terry Cora" <TerryLCora@worldnet.att.net> wrote:
> >>
> >> I am looking for a web based e-mail script (ala hotmail) for a non profit
> >> geographic spacific church directory site. Running a virtual server with a
> >We are working on this exact modification as an extension of the
> >Professional Edition of our MailMan product, as a means of providing
> >a one-stop "Free Mail" software solution, among other things. Commercial
boo-hiss.
> >licenses for the professional edition will be $400 per server for an
> >unlimited number of users, and the as-of-yet unnamed one-stop free email
> >system will run $500 per server. As a non-profit, this software would be
>
> Whoo.... pricey.
yes.
>
> I've posted this before... I've been working on something that works
> rather nicely. It doesn't use any commercial products (oh yeah, and
> it probably doesn't work with NT, but then again, nothing else does
> either) [snip]
8^)
------------------------------
Date: 26 Jul 1998 01:35:21 -0400
From: yuiop@smelt.openface.ca (Neil Kandalgaonkar)
Subject: win32 printing
Message-Id: <6pef6p$5bd@smelt.openface.ca>
Using perl on win32, how can I send a text file to the printer? (The
printer is HP, non-postscript).
Bonus question: Could I do better than a monospace text file dump? Simple
line drawing and proportional fonts would be great.
------------------------------
Date: Sat, 25 Jul 1998 23:19:37 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Y2K problem in PERL with localtime()
Message-Id: <fl_aggie-2507982319370001@aggie.coaps.fsu.edu>
In article <6pb8i4$2ji@mozo.cc.purdue.edu>, gebis@albrecht.ecn.purdue.edu
(Michael J Gebis) wrote:
+ Waitasecond. I'm admittedly confused here, but one of the
+ possiblities is that you're concerned because perl DOES NOT return
+ only two-digits for the year.
+ I'm not sure if I should laugh or cry.
The wet-ware version of the Y2K problem. That's a lot harder to
fix than the software version.
Either that, or the poor sod doesn't know how to "perldoc -f localtime"...
James
------------------------------
Date: 26 Jul 1998 05:42:02 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Y2K problem in PERL with localtime()
Message-Id: <6pefja$r1d$1@news.NERO.NET>
Keywords: y2k localtime()
In article <6pb8i4$2ji@mozo.cc.purdue.edu>,
Michael J Gebis <gebis@albrecht.ecn.purdue.edu> wrote:
>EOZSARUH@nsf.gov (Erdem Ozsaruhan) writes:
>} chop($date = sprintf ("%02d-%02d-%02d\n",$mon+1,$mday,$year));
>Waitasecond. I'm admittedly confused here, but one of the
>possiblities is that you're concerned because perl DOES NOT return
>only two-digits for the year.
>
>I'm not sure if I should laugh or cry.
It is a lot simpler to assume that he intended to get two digits back by
using a %02d format.
What you should be crying about is a standard library that is unable to
accomplish what it is asked to do (print 100 in two digits) but neither
raises an exception not flags the error in the output. Raising an
exception may be difficult to accomplish, but even poor old FORTRAN was
able to make it obvious there was an error. And even poor old FORTRAN
would not allow a programmer to put off fixing a bug where a print
format was too small -- the '*' gave the secret away.
Within the requested format, the answer being returned is "02-29-10",
which is not correct for 1900 or 2000. If the string is in a longer
sequence with other numbers following it, it is not clearly an error.
Nor would it be easy to spot this as an error if you write with an 8
character format.
However, 02-29-** would be obvious.
------------------------------
Date: Sat, 25 Jul 1998 23:38:16 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Y2K problem in PERL with localtime()
Message-Id: <MPG.10246eb2933cb2a3989791@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <6pefja$r1d$1@news.NERO.NET> on 26 Jul 1998 05:42:02 GMT, John
Stanley <stanley@skyking.OCE.ORST.EDU> says...
> In article <6pb8i4$2ji@mozo.cc.purdue.edu>,
> Michael J Gebis <gebis@albrecht.ecn.purdue.edu> wrote:
> >EOZSARUH@nsf.gov (Erdem Ozsaruhan) writes:
> >} chop($date = sprintf ("%02d-%02d-%02d\n",$mon+1,$mday,$year));
>
> >Waitasecond. I'm admittedly confused here, but one of the
> >possiblities is that you're concerned because perl DOES NOT return
> >only two-digits for the year.
> >
> >I'm not sure if I should laugh or cry.
>
> It is a lot simpler to assume that he intended to get two digits back by
> using a %02d format.
Then he should have computed the value mod 100.
> What you should be crying about is a standard library that is unable to
> accomplish what it is asked to do (print 100 in two digits) but neither
That is *not* what it is being asked to do. That may be what you want it
to do, but it was written long before the Perl DWIMmer. What it is
being asked to do is to print the value of the corresponding argument as
a decimal integer in *AT LEAST TWO* digits, left-padding with a zero if
less than 10 in absolute value and preceding with a minus sign if
negative. (BTW, that *should* be written as '%.2d' in any case, as I
have said here before.)
> raises an exception not flags the error in the output. Raising an
> exception may be difficult to accomplish, but even poor old FORTRAN was
> able to make it obvious there was an error. And even poor old FORTRAN
> would not allow a programmer to put off fixing a bug where a print
> format was too small -- the '*' gave the secret away.
>
> Within the requested format, the answer being returned is "02-29-10",
> which is not correct for 1900 or 2000. If the string is in a longer
> sequence with other numbers following it, it is not clearly an error.
> Nor would it be easy to spot this as an error if you write with an 8
> character format.
>
> However, 02-29-** would be obvious.
You are complaining about a deliberate choice that was made in the design
of the printf function in the Standard C Library lo these thirty years
ago. The reasoning is very straightforward and, I believe, quite
correct.
The printf function pads and rounds when requested, but *never* truncates
numerical values that overflow their *minimum* specified field width.
This ensures that reasonable further computer processing of the output
file will deal with correct numerical values, not truncated ones.
Reports from poor old Fortran (that's how it's spelled these days) were
intended for human eyeballs, and ** might be more obvious than a three-
digit field where two were expected, say. But -- unless anticipated --
it would give an input number-parsing routine serious hiccups.
As the behavior of ANSI/ISO Standard C printf is fully documented this
way, it is not going to change, nor is Perl's adaptation of it. But you
seem to enjoy complaining about it anyhow.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
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 3256
**************************************