[8606] in Perl-Users-Digest
Perl-Users Digest, Issue: 2223 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 1 08:08:10 1998
Date: Wed, 1 Apr 98 05:00:48 -0800
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, 1 Apr 1998 Volume: 8 Number: 2223
Today's topics:
Re: A SSI question :-) <alan@consultancy-services.ferret.com>
Re: A SSI question :-) <ben@wallroyds.demon.co.uk>
Re: Anon Scalar Expression (was: Evaluate expression in (David A. Black)
db and mail <fr39@dial.pipex.com>
Re: God Help Us All (was: Re: Sneex having problems) <stackhou@execpc.com>
help installing perl for iis <wylie@masterlink.com>
Re: How to determine a thingy's package given only a re <ewinter@pop3.stx.com>
Re: Need sorting routine in Perl (Michael J Gebis)
non integer sleep <eeparrad@swansea.ac.uk>
Re: non integer sleep <ebohlman@netcom.com>
perl & iis returning frontpage error <wylie@masterlink.com>
PERL Far Eastern Language Support <chris@cmcardle.demon.spam.co.uk>
Perl, RedHat 5.0 and Net modules (servers).. <marius@ace.funcom.com>
Refcounts when XSUB creates PERL objects. <alanm@ilx.com>
Re: Rotating HTML using Perl <mindmore@mindless.com>
Re: small letters into capital letter <mindmore@mindless.com>
SOLVED: Perl, RedHat 5.0 and Net modules (servers).. <marius@ace.funcom.com>
Re: The "Y2k-bugs-are-not-just-a-legacy-problem" FAQ <alan@consultancy-services.ferret.com>
Re: The "Y2k-bugs-are-not-just-a-legacy-problem" FAQ (Martin Tom Brown)
Re: The "Y2k-bugs-are-not-just-a-legacy-problem" FAQ <bert@dgb.nl>
Re: what is wrong with being a novice ?? (Craig Pickles)
Re: what is wrong with being a novice ?? (David A. Black)
What modules are available on my computer? <raconway@atos-group.com>
Re: What to do about "regexp *+ operand could be empty" <garethr@cre.canon.co.uk>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 1 Apr 1998 10:28:59 +0100
From: Alan Silver <alan@consultancy-services.ferret.com>
Subject: Re: A SSI question :-)
Message-Id: <kXYtGmAbjgI1EwJ4@consultancy-services.com>
Ben <ben@wallroyds.demon.co.uk> wrote ...
>Hello all :-) ...
>
>First of all ... I'm so sorry about my bad English.
>
>I have a .shtml webpage. It runs a CGI script ... The script is to detect
>the surfer's IP address and look up the "Banned surfers" database and if
>it's matched ... It will print "Sorry, but you're banned from viewing the
>page" ... But, the problem is, it also show the *.shtml page in which it
>shouldn't ...
>
>I wonder if anyone can tell me how to tell them that they're banned and NOT
>showing the .shtml page?
>
>The script was written in Perl.
If I understand you correctly, you want to show the page if they're not
banned, and show a plain "get lost" message if they are banned. The way
to do this is have the CGI script output the message if they are banned
and ALSO have it output the normal page if they are not banned.
The thing with SSEs is that they can only add text to a page, not
replace or remove it. For that, you need to have the rest of the text
output from the CGI script as well.
Hope this is clear, if not post back.
Alan
NOTE - In order to discourage unsolicited e-mail, the address in the
header may have .ferret added. Please remove this before replying.
--
Sent By : Alan Silver
Fish Page : http://www.geocities.com/Heartland/Hills/6749/fishtank.html
It's not an optical illusion, it just looks like one
------------------------------
Date: Wed, 1 Apr 1998 11:48:26 +0100
From: "Ben" <ben@wallroyds.demon.co.uk>
Subject: Re: A SSI question :-)
Message-Id: <891427713.28224.0.nnrp-07.c2de5b4a@news.demon.co.uk>
Hello Alan ...
Thank you very much for the reply :-)
You described it perfectly.
I thought that - But, there's a major disadvantage, the search engines, of
course ... won't search CGI scripts :-)
Or, can they?
But, really, there is no way to do that? Is it the ONLY way? (Ie - output
the page via CGI script)?
Thanks again for answering to my question, earlier ...
Best Regards
Ben :-)
Alan Silver wrote in message ...
>Ben <ben@wallroyds.demon.co.uk> wrote ...
>>Hello all :-) ...
>>
>>First of all ... I'm so sorry about my bad English.
>>
>>I have a .shtml webpage. It runs a CGI script ... The script is to detect
>>the surfer's IP address and look up the "Banned surfers" database and if
>>it's matched ... It will print "Sorry, but you're banned from viewing the
>>page" ... But, the problem is, it also show the *.shtml page in which it
>>shouldn't ...
>>
>>I wonder if anyone can tell me how to tell them that they're banned and
NOT
>>showing the .shtml page?
>>
>>The script was written in Perl.
>
>If I understand you correctly, you want to show the page if they're not
>banned, and show a plain "get lost" message if they are banned. The way
>to do this is have the CGI script output the message if they are banned
>and ALSO have it output the normal page if they are not banned.
>
>The thing with SSEs is that they can only add text to a page, not
>replace or remove it. For that, you need to have the rest of the text
>output from the CGI script as well.
>
>Hope this is clear, if not post back.
>
>Alan
>
>
>NOTE - In order to discourage unsolicited e-mail, the address in the
>header may have .ferret added. Please remove this before replying.
>
>--
>
>Sent By : Alan Silver
>Fish Page : http://www.geocities.com/Heartland/Hills/6749/fishtank.html
>
>It's not an optical illusion, it just looks like one
------------------------------
Date: Wed, 1 Apr 1998 06:40:09 EST
From: dblack@saturn.superlink.net (David A. Black)
Subject: Re: Anon Scalar Expression (was: Evaluate expression inside print "")
Message-Id: <6ft92p$5gp$1@earth.superlink.net>
Hello -
John Porter <jdporter@min.net> writes:
>David A. Black wrote:
>> Also - perhaps the hypothetical <> operator would conflict, logically
>> and/or syntactically, with symbolic references?
>Well, I'm not advocating the adoption of the angle braces for this
>use...
>but if perl were modified to use them that way, it would only be
>par for the course.
I was thinking not so much of the choice of <>, but of how certain
constructs would be handled. Actually there may not be as much
ambiguity as I'd thought. Examples I'd been playing around with
were things like:
$var = 'a';
$b = 123;
print ${<++$var>}; # using hypothetical <> operator
Since <++$var> would in fact return a reference, there would be no
ambiguity about it - i.e., no decision required as to whether
to treat the construct as a symbolic reference (which is what I
had been puzzling through).
So - I've solved a phantom problem affecting a non-existent feature
of Perl :-)
David Black
dblack@saturn.superlink.net
------------------------------
Date: 1 Apr 1998 10:05:33 GMT
From: "Miss WILKINS" <fr39@dial.pipex.com>
Subject: db and mail
Message-Id: <01bd5d55$9f8c0940$73f482c1@lonriu3>
Hi
I want to set up a database (probably mSQL) on a linux box.
The idea for the script (written in PERL) is too take email from my popbox
( I may have the chanceof running the popbox on the same server) and strip
it, and place the correct details into teh correct fields in the database.
Has anyone done anything like this, or does anyone have any pointers. I
would also like to do the same with a fax, but I think that maybe a little
harder. I am building a database of information, but to save me having to
re-type everything into the database i want to automate the process, as
long as the data comes in a fixed format
Iqbal
PS please reply via email also to iqbal@etc.prestel.co.uk
------------------------------
Date: Wed, 01 Apr 1998 05:32:23 -0600
From: Mark Stackhouse <stackhou@execpc.com>
Subject: Re: God Help Us All (was: Re: Sneex having problems)
Message-Id: <6ft8sf$fd3@newsops.execpc.com>
Sorry Sneex. It just erks me when the Tower beats on anyone.
>From now on, I'll stand my own ground :-) I have to deal with
this sort, face to face, in the real world. It's a cake walk to
face off against a monitor!
Sneaker's Nest wrote:
>
> Stop defending me Mark.
>
> Some of what he says is true.
> I am guilty of being a newbie.
>
> The only difference I see
> between John Porter and the
> other posters is that the
> others have some civility.
>
> In a private letter someone
> once told me to live with it.
>
> Well, they should practice
> what they preach.
>
> Live with it.
--
Mark Stackhouse
***********************************************************************
homepage: http://www.execpc.com/~stackhou
"The best things in life aren't things."
--Art Buchwald
***********************************************************************
------------------------------
Date: Tue, 31 Mar 1998 19:37:11 -0600
From: "Wylie Dunham" <wylie@masterlink.com>
Subject: help installing perl for iis
Message-Id: <6fs5ot$s44@news.cybernews.net>
I Am Having a problem installing perl on my nt 4. box running iis 3. The
error I get while running a script in a browser is as follows:CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
Can't open perl script "C:\FrontPage": No such file or directory
I have already registered the .pl and .cgi with the perl.exe %s %. I also
get the same error running a script from the command line "Can't open perl
script "C:\FrontPage": No such file or directory" I dont know where this
FrontPage dir came from, as I did not specify it in any setup.
Thanks in advance for any help.
Wylie wylie@masterlink.com
------------------------------
Date: Wed, 1 Apr 1998 06:21:39 -0500
From: "Eric Winter" <ewinter@pop3.stx.com>
Subject: Re: How to determine a thingy's package given only a ref to the thingy
Message-Id: <6ft80v$2aj@post.gsfc.nasa.gov>
I would search through the symbol table from the main package (which should
lead you to all other packages) until you find it. See p. 281 in the new
Camel book for a discussion.
hth
Eric Winter
Matthew D. Langston wrote in message
<35193A5C.4FD06DA1@SLAC.Stanford.EDU>...
>Hello all,
>
>Given a reference to a thingy (e.g. a subroutine), how would one
>determine the package where that thingy is defined?
------------------------------
Date: 1 Apr 1998 01:31:09 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Need sorting routine in Perl
Message-Id: <6fs5ct$a94@mozo.cc.purdue.edu>
beans@bedford.net (TomH) writes:
}Am I reading it wrong, or is this a really silly implementation of
}Bubble Sort? Dig out a copy if Knuth's classic book "Sorting And
}Searching" and you'll see why fast_sort should be called
}really_slow_sort
Well, my first version is as follows, and I think you'll see, this one
is not quite so fast (although at least this one is guaranteed to
finish). I'm sure that Tom Christiansen will be proud to have his
name attached to this, so I should mention that this is largely lifted
from the FAQ.
#!/bin/perl
sub is_sorted {
my($x,@list)=@_;
my($e);
if($#list==-1){return 1;}
foreach $e (@list) {
if($e>=$x) {
$x=$e;
} else {
return 0;
}
}
return 1;
}
sub sorta_fast_sort {
my @head = @{ $_[0] };
my @tail = @{ $_[1] };
unless (@head) {
if(is_sorted(@tail)){
print join(" ",@tail),"\n";
exit(0);
}
# print "@tail\n";
} else {
my(@newhead,@newtail,$i);
foreach $i (0 .. $#head) {
@newhead = @head;
@newtail = @tail;
unshift(@newtail, splice(@newhead, $i, 1));
sorta_fast_sort([@newhead], [@newtail]);
}
}
}
#Try this first
sorta_fast_sort([9,8,7,6,1,6,7],[]);
#Later try this:
#sorta_fast_sort([9,8,7,6,1,2,3,4,14,6,7],[]);
#On my machine, runs at:
#15091.0u 0.0s 4:47:54 87% 0+0k 0+0io 0pf+0w
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Wed, 01 Apr 1998 12:46:04 +0000
From: Dean Parratt <eeparrad@swansea.ac.uk>
Subject: non integer sleep
Message-Id: <3522370C.2F1A@swansea.ac.uk>
I know that sleep() can be used to delay perl programs for say 10
seconds or whatever. But say you wanted to cause a delay of 3.2 seconds
or 5.5 seconds, can this be done, if so can anyone tell me how.
Thanks
Dean.
------------------------------
Date: Wed, 1 Apr 1998 12:15:21 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: non integer sleep
Message-Id: <ebohlmanEqqI1M.30K@netcom.com>
Dean Parratt <eeparrad@swansea.ac.uk> wrote:
: I know that sleep() can be used to delay perl programs for say 10
: seconds or whatever. But say you wanted to cause a delay of 3.2 seconds
: or 5.5 seconds, can this be done, if so can anyone tell me how.
perldoc -f select
------------------------------
Date: Tue, 31 Mar 1998 19:42:46 -0600
From: "Wylie Dunham" <wylie@masterlink.com>
Subject: perl & iis returning frontpage error
Message-Id: <6fs63d$sgj@news.cybernews.net>
I Am Having a problem installing perl on my nt 4. box running iis 3. The
error I get while running a script in a browser is as follows:CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
Can't open perl script "C:\FrontPage": No such file or directory
I have already registered the .pl and .cgi with the perl.exe %s %. I also
get the same error running a script from the command line "Can't open perl
script "C:\FrontPage": No such file or directory" I dont know where this
FrontPage dir came from, as I did not specify it in any setup.
Thanks in advance for any help.
Wylie wylie@masterlink.com
------------------------------
Date: Wed, 1 Apr 1998 13:54:01 +0100
From: "Christian" <chris@cmcardle.demon.spam.co.uk>
Subject: PERL Far Eastern Language Support
Message-Id: <891435341.17580.0.nnrp-03.c2d90c94@news.demon.co.uk>
I am attempting to convert an application from English into Japanese. This
application seems to make very heavy use of Perl, which I admit I don't know
much about. I would like to know if Perl supports the use of double byte
character systems (i.e. EUC) or Unicode. I couldn't find anything in the
FAQs, except something about locale support which does not mention double
byte languages.
If anyone can help, whether the news is good or bad, could they mail as well
as post, as there are so many messages in this group I might miss something
useful. Don't forgot to unmangle the return address.
Thanks.
Christian
<chris@cmcardle.demon.removespamfilter.co.uk>
------------------------------
Date: 01 Apr 1998 13:25:48 +0200
From: Marius Kjeldahl <marius@ace.funcom.com>
Subject: Perl, RedHat 5.0 and Net modules (servers)..
Message-Id: <52pvj1pyv7.fsf@ace.funcom.com>
I found a previous posting a couple of weeks old without any answers,
so I'm trying to describe it again. I've had a couple of different
server processes written using the Net-ext module which have worked
flawlessly for some period of time.
After upgrading to RedHat 5.0 they do not work any more. Well, they
start up normally without any error messages (and yes, I do check the
return codes for errors). But they do not actually listen to the
port. Netstat does not report any listeners on the port, and if I try
to connect to the port anyhow, I get connection refused.
I have tried both 5.003 and 5.004 rpms from RedHat and a clean compile
of the perl source (from cpan) - nothing new happens (i.e. it still
will not work).
I have included a simple forking server which simply display whatever
it receives to STDOUT if anybody wants to test it.
Does anybody know what needs to be done to get such server working
under Perl 5 and RedHat 5.0?
Thanks in advance..
Marius
#!/usr/bin/perl -w
use strict;
use Net::TCP;
my $VERSION = 0.01;
# Set default port number
my $portno = 1034;
# Read port number from the command line if it exists
$portno = $ARGV[0] if defined ($ARGV[0]);
my $srv = new Net::TCP::Server $portno or die "new Net::TCP::Server: $|\n";
print "FULF $VERSION listening on $portno\n";
# Avoid creating zombies
$SIG{CHLD} = sub { wait; };
# Activate auto-flush
$| = 1;
while (my $nc = $srv->accept) {
# Forks off a new server to handle this request
defined (my $pid = fork) or die "fork: $|\n";
if ($pid) {
# Parent process does not need access to the child's filehandle
$nc->stopio;
# Jumps back to start of while loop
next;
}
# Only child processes get here
print "accepted connection from ", $nc->format_remote_addr, "\n";
# Child process does not need access to the parent's filehandle
$srv->stopio;
# This is the main event loop for all the forked children and is
# where the action takes place. This while loop runs until the
# connected process shuts down the connection.
my $line;
while (defined ($line = $nc->getline)) {
print $line;
}
# Exits the child process
print "closed connection from ", $nc->format_remote_addr, "\n";
exit(0);
}
------------------------------
Date: Mon, 30 Mar 1998 15:17:01 GMT
From: Alan McKenney <alanm@ilx.com>
Subject: Refcounts when XSUB creates PERL objects.
Message-Id: <351FB756.1959@ilx.com>
Subject: Refcounts when XSUB creates PERL objects.
I just finished getting a C subroutine (PERL "extension")
to work, and am now totally confused about how the various
functions for SV's, AV's, etc. handle reference counts,
"mortality", etc. Can anyone explain it in a clear way?
My Situation:
In my C subroutine, I create an array-of-arrays;
more exactly, I return a reference to an array of references to arrays.
I do this by the following steps:
- I create an AV for the first row (which will be filled in last)
using "newAV".
- I create an RV for the first row, using "newRV", and use it
to create the top-level array, using "av_make( 1, &reference )".
- Inside the loop (over "rows"), I:
+ Fill up a C array of SV *'s using the "newSVxx" functions.
+ Create a (filled) AV using "av_make".
+ Release the SV's by using SvREFCNT_dec on each element of the
C array.
+ Get an RV to the AV using "newRV" on the AV.
+ Push the RV onto the top-level array. (using av_push)
- When the loop is finished:
- I fill in the first row using av_push on SV's created with
newSVxx.
- I then create an RV to the top level array, and set RETVAL
to that.
*Now*: I don't want these things to hang around forever.
Once the PERL program that calls this subroutine gets my
array-of-arrays, I would like the array and its components
to get deallocated as soon as the PERL program has no references
to it; for example, if the PERL program doesn't have any variables
referencing it or any components.
Originally, I had the impression from the PERLGUTS document that
that all SV/RV/AV/... objects started out with a refcount of 1, and
that putting them -- or a reference to them -- into an array or
reference would bump up the refcount. So I made a "sv_2mortal" call
on everything.
This resulted in lots of warnings about "trying to free an
unreferenced value" (or words to that effect), and an
array-of-arrays that was missing pieces. I started removing
sv_2mortal calls until I got something that worked.
I finally ended up making the AV's mortal, but not the RV's.
The SV's in the C array I still did SvREFCNT_dec on with no
problem, but the SV's I passed to av_push I could not get away
with making mortal. It works, but makes no sense at all to me.
After this, I tried adding a sv_2mortal calls one at a
time, and found that any additional calls would cause error
messages or missing data or both. I don't yet know for sure
that I don't have memory leaks, though.
My question:
(a) Could someone explain exactly what functions and actions
modify the reference count, and under what circumstances?
(b) Is there any difference between "making an SV/... mortal" and
"decrementing an SV/...'s reference count"?
(c) Under what circumstances should an SV/... be explicitly made
mortal, and when not?
Note: Please send me an E-mail copy of any substantive response
you post, as my News server seems to miss a lot of posts.
Perl Version Info:
I'm using PERL version 5.003 "with EMBED", under Solaris
(uname -a reports "SunOS 5.5.1"), plus "suidperl security patch".
"xsubpp" has the line "$XSUBPP_version = "1.935"".
I don't know what Sun calls the machine I'm running on, but
I know it's some sort of multi-headed Sun SPARC machine.
--
Alan McKenney Disclaimer: I speak and write for myself
ILX Systems alone. If you think anything in this post
New York, NY is an opinion, announcement, position,
E-mail: alanm@ilx.com policy, etc., of ILX, you are mistaken.
------------------------------
Date: Wed, 01 Apr 1998 14:00:34 +0300
From: Fain <mindmore@mindless.com>
To: ffinstad@best.com
Subject: Re: Rotating HTML using Perl
Message-Id: <35221E52.ED9A8223@mindless.com>
Franco Finstad wrote:
> I'd would like to have different text displayed each time my homepage is
> loaded. I need the text to be read from a text file that I'm constantly
> updating. Is this possible using Perl?
>
> Any help is appreciated.
>
> Thanks
> Franco Finstad
Yes it is very possible.
here is what will have to happen.
You make your web page a cgi script instead of a HTML page (unless you yes
SSI which I am not as familiar with).
All that you would need in the CGI script something that writes to a file
and reads from a file each time someone comes to the site.
anymore question (sorry I wasn't more descriptive).
- Nathan
mindmore@mindless.com
------------------------------
Date: Wed, 01 Apr 1998 13:52:53 +0300
From: Fain <mindmore@mindless.com>
To: Andre Vieth <Andre.Vieth@schwerin.netsurf.de>
Subject: Re: small letters into capital letter
Message-Id: <35221C85.57C18D99@mindless.com>
Andre Vieth wrote:
> perl problem:
> I4d like to transform small letters (saved in a variable) into capital
> letters.
> Do I have to replace each and every single letter (26) by the following
> command: $Text =~ s/a/A/;/g; or is there an easier command to solve
> this problem.
> (I4m not a professional programmer, I just try to write a small script
> for my webpage..)
> Thanking in advance
> Andre Vieth
Here is how you would change all the letters into upper case:
$upcase=uc(notetoself_Ilikeuppercasemorethenlower);
here are some others along the same line of thought:
from any case to lowercase: $lwcase=lc(STOPHIMFROMWRITINGNOTESTOHIMSELF);
from any case to Firs Letter Upper Case: $lupcase=ucfirst(nathan);
from any case to First Letter Lowercase: $llccase=lsfirst(NATHAN);
and if there is any confusion here is the output of our all our variables:
$upcase: NOTETOSELF_ILIKEUPPERCASEMOTETHENLOWER
$lwcase: stophimfromwritingnotestohimself
$lupcase: Nathan
$llccase: nATHAN
I'm not so sure about how it handles the First letter case changes (if it
touches the rest of the letter after the first or if it leaves them
alone... try it out for your self I guess).
Let me know if you have any problems
- Nathan
mindmore@mindless.com
------------------------------
Date: 01 Apr 1998 13:34:29 +0200
From: Marius Kjeldahl <marius@ace.funcom.com>
Subject: SOLVED: Perl, RedHat 5.0 and Net modules (servers)..
Message-Id: <52n2e5pygq.fsf@ace.funcom.com>
My apologies. Some further testing revealed that it had nothing to do
with Perl 5 or RedHat 5.0. The problem is the latest version of the
net module Net-ext-0.83. I downgraded to Net-ext-0.78 again and it
works again.
Marius
------------------------------
Date: Wed, 1 Apr 1998 10:23:25 +0100
From: Alan Silver <alan@consultancy-services.ferret.com>
Subject: Re: The "Y2k-bugs-are-not-just-a-legacy-problem" FAQ
Message-Id: <Y3diejANegI1Ews0@consultancy-services.com>
"Paul E. Bennett" <peb@transcontech.co.uk> wrote ...
>I have been using 32 bits
>for day numbers (from a reference date) for some years now. It gives me a
>problem about 6 million years from now
OH NO !!!!!!! Quick !! Ring the press, panic the public, pull all of the
aged Logo programmers out of retirement and pay them millions of Dollars
per second until they fix the problem. The world is going to end and I'm
off for a lie down.
Alan
NOTE - In order to discourage unsolicited e-mail, the address in the
header may have .ferret added. Please remove this before replying.
--
Sent By : Alan Silver
Fish Page : http://www.geocities.com/Heartland/Hills/6749/fishtank.html
It's not an optical illusion, it just looks like one
------------------------------
Date: Wed, 01 Apr 98 08:55:51 GMT
From: Martin@nezumi.demon.co.uk (Martin Tom Brown)
Subject: Re: The "Y2k-bugs-are-not-just-a-legacy-problem" FAQ
Message-Id: <891420951snz@nezumi.demon.co.uk>
In article <35214BBC.E8387F84@swbell.net> royf@swbell.net "Roy Frederick" writes:
> I believe that Bob Richardson (currently at Liant) and I originated
> the nanocentury unit and the observation that it is approximately
> pi seconds: During a drive back to U of T at Austin from Dallas in 1967 we
A year is pi x 10^7 seconds goes a long way further back than that.
Remember a time when teams of computors did calculations longhand ?
They had lots of little tricks to get slide rule accuracy quickly.
Regards,
--
Martin Brown <martin@nezumi.demon.co.uk> __ CIS: 71651,470
Scientific Software Consultancy /^,,)__/
------------------------------
Date: Wed, 01 Apr 1998 13:26:25 +0100
From: Bert Bril <bert@dgb.nl>
Subject: Re: The "Y2k-bugs-are-not-just-a-legacy-problem" FAQ
Message-Id: <35223271.61604E90@dgb.nl>
Daniel P. B. Smith wrote:
> It was recently pointed out to me that "one furlong per fortnight"
> is almost exactly 1 centimeter per minute. How's that for useful?
Is there something wrong here? Is a furlong 201.6 m?
Or should it be '1 centimeter per hour'?
In which case a furlong is a more comprehensible 3.36 m.
Bert
-- de Groot - Bril Earth Sciences B.V.
-- Boulevard 1945 - 24, 7511 AE Enschede, The Netherlands
-- mailto:bert@dgb.nl , http://www.dgb.nl
-- Tel: +31 534315155 , Fax: +31 534315104
------------------------------
Date: Wed, 01 Apr 1998 10:00:16 GMT
From: pickles_c@hotmail.com (Craig Pickles)
Subject: Re: what is wrong with being a novice ??
Message-Id: <35230e6a.65547284@news.demon.co.uk>
>As another 'inexperienced' perl programmer I agree entirely with your
>posting. I sometime get flamed on the IRC for asking questions that are
>really in the FAQ and quite rightly because I should really spend more time
>reading (if I had the luxury of time).
I had the same problem, I got Kick/banned from the perl5 channel on
IRC for asking the question "Can someone please tell me the equivelent
of Visual basics SELECT CASE" then some guy started flaming me telling
me that "its a FAQ and to F**K off"
I had read the FAQ but hadnt found it, although it does tell you....
the command I was looking for was switch, but hey........ thats all I
wanted... if someone had said to me "switch" then I would have looked
it up and worked out how to use it myself....
Sometimes us "newbies" arent just lazy or thick, its just we are used
to a different language (or system or whatever) and just need slightly
pointing in the right direction.... I for one wouldnt dream of asking
a question until I had searched, or asking someone to write routines
for me (you learn quicker by experimental practice) but sometimes we
really need to ask these questions because we simply need pointing in
the right direction.....
Please guys, be more lenient with us :)
Craig Pickles
------------------------------
Date: Wed, 1 Apr 1998 06:28:13 EST
From: dblack@saturn.superlink.net (David A. Black)
Subject: Re: what is wrong with being a novice ??
Message-Id: <6ft8cd$53q$1@earth.superlink.net>
Hello -
pickles_c@hotmail.com (Craig Pickles) writes:
>I had the same problem, I got Kick/banned from the perl5 channel on
>IRC for asking the question "Can someone please tell me the equivelent
>of Visual basics SELECT CASE" then some guy started flaming me telling
>me that "its a FAQ and to F**K off"
>I had read the FAQ but hadnt found it, although it does tell you....
>the command I was looking for was switch, but hey........ thats all I
>wanted... if someone had said to me "switch" then I would have looked
>it up and worked out how to use it myself....
If the FAQ tells you that Perl's equivalent of *anything* is the
'switch' command, then the FAQ has been sabotaged. There is no such
command (or function, or anything else).
candle:~$ perl -we 'switch'
Unquoted string "switch" may clash with future reserved word at -e line 1.
David Black
dblack@saturn.superlink.net
------------------------------
Date: Wed, 1 Apr 1998 12:12:17 +0200
From: "R. Allen Conway" <raconway@atos-group.com>
Subject: What modules are available on my computer?
Message-Id: <14953E9BAF17D111926800805FA66B7102E1B804@hermes.atos-group.com>
Message en plusieurs parties et au format MIME.
------=_NextPart_000_0007_01BD5D67.458C7710
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
How can you get the list of modules that have been installed on a
computer?
------=_NextPart_000_0007_01BD5D67.458C7710
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3D'"MSHTML 4.71.1712.3"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>How can you get the =
list of modules=20
that have been installed on a computer?</FONT></DIV></BODY></HTML>
------=_NextPart_000_0007_01BD5D67.458C7710--
------------------------------
Date: Wed, 1 Apr 1998 11:06:21 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
Subject: Re: What to do about "regexp *+ operand could be empty"?
Message-Id: <sik999ztqq.fsf@cre.canon.co.uk>
Michael Schuerig <schuerig@acm.org> wrote:
> I'm using a snippet from Tom Christiansen's striphtml to (rough and
> ready) replace HTML markup with whitespace.
>
> $text =~ s{<(?:[^>'"]*|".*?"|'.*?')+>}{ }ogsx;
>
> It worked once upon a time (around Perl 5.002(?), I think), but now I'm
> getting this error message:
>
> regexp *+ operand could be empty.
The parenthesis in your regular expression, namely
(?:[^>'"]*|".*?"|'.*?')
matches the empty string (since [^>'"]* matches the empty string). You
are then asking Perl to match one or more copies of the empty string,
which makes no sense.
Either rewrite your regexp so it doesn't match the empty string,
<(?:[^>'"]+|".*?"|'.*?')+>
or if you insist on recognising <> as an HTML tag, try
<(?:[^>'"]+|".*?"|'.*?')*>
--
Gareth Rees
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 2223
**************************************