[7350] in Perl-Users-Digest
Perl-Users Digest, Issue: 975 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 4 13:17:12 1997
Date: Thu, 4 Sep 97 10:00:45 -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 Thu, 4 Sep 1997 Volume: 8 Number: 975
Today's topics:
Can I specify fonts? <ginakra@one.net>
Re: Can we use a MS Acces DB with a Perl Script ? <miran.sepic4@mss.tel.hr>
Re: complex pattern?!? it shouldn't be, i think :) <tom@mitra.phys.uit.no>
Date calculation help <chaffee@cpdmfg.cig.mot.com>
Re: Date calculation help <seay@absyss.fr>
Re: Erase line when using print (progres meter) (Jason Gloudon)
ExtUtils package not in Activeware port <chiue@nortel.ca>
Re: Finding files - idiom? (William Wue(2xP)elma(2xN))
Re: formatted reading? <tom@mitra.phys.uit.no>
Re: formatted reading? <ajohnson@gpu.srv.ualberta.ca>
Re: FTP with perl <tom@mitra.phys.uit.no>
Re: grep-like search with multiple file output? <tom@mitra.phys.uit.no>
Re: grep-like search with multiple file output? <tom@mitra.phys.uit.no>
How do I embed C in Perl duesterwald@gei-aachen.de
Re: How to open a file for both read and write (William Wue(2xP)elma(2xN))
Re: Is Perl for Win32 really as brain damaged as it see <garyng@ibm.net>
Re: Is Perl for Win32 really as brain damaged as it see (Gurusamy Sarathy)
Re: IS there a 'strlen' in Perl? <seay@absyss.fr>
Re: IS there a 'strlen' in Perl? (Brian Wheeler)
Password Verification Case Sensitivity <jason@ernie.liglobal.com>
Re: Perl (kind of) math question. (William Wue(2xP)elma(2xN))
Re: Perl (kind of) math question. <seay@absyss.fr>
Re: perl and XEmacs (I R A Aggie)
Perl with Microsoft Developer Studio? <miran.sepic4@mss.tel.hr>
Re: Simple Perl for Win 32 Question (not in FAQ) (Ronald L. Parker)
test CGI's wwithout uploading to ISP w/Frontpage 97 <ginakra@one.net>
What's the difference b/w Oraperl versions? <chewie@dtai.com>
Re: WHY doesnt this work ?? (Andrew M. Langmead)
Re: Win32/ Perl -S (pl2bat) (Gurusamy Sarathy)
Re: Wrote new module, need help with system dependencie (Andrew M. Langmead)
yesterday's date <webmaster@mid-states.com>
Re: yesterday's date <seay@absyss.fr>
Re: yesterday's date (Steve O'Hara Smith)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 04 Sep 1997 11:42:21 -0400
From: Gina Anderson <ginakra@one.net>
Subject: Can I specify fonts?
Message-Id: <340ED6DD.FE6486E6@one.net>
Hello,
Newbie here...I am just starting with CGI and Perl, but I have a
question I have not been able to find in any book I got, or anywhere on
the web for that matter.
I have a guestbook that I am currently trying to customize. I use the
font Arial or Helvetica in all my web pages using the font face tag in
the HTML, and the guestbook cgi outputs regular times new roman, or
default font for the platform.
Is it possible to specify a certain font output to create? I know,
picky, picky! :)
If this is possible, how and where would I put this in the CGI?
Thanks In Advance,
Gina
--
_\/_ | _\/_
/o\\ \ / //o\
| .-'-. |
_|_______ -- / \ -- ______|__
jgs `~^~^~^~^~^~^~^~^~^~^~^~`
Gina Anderson ginakra@one.net
http://members.aol.com/ginakra
Need a web page?
Contact Me For Affordable Rates!
------------------------------
Date: 4 Sep 1997 14:57:15 GMT
From: "Miran Sepic" <miran.sepic4@mss.tel.hr>
Subject: Re: Can we use a MS Acces DB with a Perl Script ?
Message-Id: <01bcb942$d84c2420$7a02a8c0@pc_miran>
I am working with MS Acces DB and Perl, I saw the examples at
http:\\www.ptyx.com\howto, it was so far the best information i can get.
Miran
Samuel Chenal <samuel.chenal@ans.ch> wrote in article
<340BDD00.B7E51326@ans.ch>...
> I'd like to know if we can use a MS Acces DB to store data from a perl
> script. It would be great if you had an exemple for me.
>
> Thanks
>
> Samuel Chenal
>
>
>
------------------------------
Date: 04 Sep 1997 16:12:14 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: complex pattern?!? it shouldn't be, i think :)
Message-Id: <nqod8mpuq0x.fsf@mitra.phys.uit.no>
Jeff Rosenfeld <jeffro@fore.com> writes:
> will notice that I cheated a little to handle nested angle brackets):
I don't think you can handle arbitrarily nested delimiters with a
regex.
> % perl5 -pe '1 while s/<([^<"]|\"(\\.|[^\\"])*\")*?>//g'
> a <img src= "rt-arrow.gif" alt= "==>" >b
> a b
> a <!-- <This line is a (single) valid HTML 2.0 comment> --> b
> a b
a <!-- This line is a (single) valid HTML 2.0 comment> --> b
a --> b
> - Jeff.
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Thu, 04 Sep 1997 10:02:35 -0500
From: Mark Chaffee <chaffee@cpdmfg.cig.mot.com>
Subject: Date calculation help
Message-Id: <340ECD8B.5B9A@cpdmfg.cig.mot.com>
I have seen many modules (at CPAN) for Date calculations, but they are
far more than I need. I am quite a perl newbie and need a simple
routine to calculate date. I'd prefer something I can write into a
script or call from another. Since I don't have the knowledge base to
use one of the "bigger" modules, would someone have the patience to
possibly post something?
Here is what I am trying to do:
Two dates are currently given in this format: mm/dd/yyyy I need to
search a flat text file and print any lines that contain any date
between and including the two inputed dates. The format of the dates in
the text file is also mm/dd/yyyy
I guess I need to somehow convert the dates to numbers, compare them to
find the delta, and write a loop to grep the file for each sequential
number (after converting that number back to it's original formay). Am
I making any sense at all?
I can write the routine to do all the grepping and necessary looping,
but the date thing just has my undies in a bundle...
I really appreciate any help that can be given! If anyone does choose
to reply, please email me as well as posting. Thanks!
--
- Mark Chaffee
chaffee@cpdmfg.cig.mot.com
------------------------------
Date: Thu, 04 Sep 1997 17:42:10 +0200
From: Doug Seay <seay@absyss.fr>
To: chaffee@cpdmfg.cig.mot.com
Subject: Re: Date calculation help
Message-Id: <340ED6D2.65E5FB79@absyss.fr>
[posted and mailed]
Mark Chaffee wrote:
>
> I have seen many modules (at CPAN) for Date calculations, but they are
> far more than I need. I am quite a perl newbie and need a simple
> routine to calculate date. I'd prefer something I can write into a
> script or call from another. Since I don't have the knowledge base to
> use one of the "bigger" modules, would someone have the patience to
> possibly post something?
I've never used those modules either, but that is only because I haven't
needed them. Most modules are rather easy to use once you play with
them a bit. Give 'em a try. And that is the only way you'll ever get
the "knowledge base" that you want/need.
> Here is what I am trying to do:
>
> Two dates are currently given in this format: mm/dd/yyyy I need to
> search a flat text file and print any lines that contain any date
> between and including the two inputed dates. The format of the dates in
> the text file is also mm/dd/yyyy
>
> I guess I need to somehow convert the dates to numbers, compare them to
> find the delta, and write a loop to grep the file for each sequential
> number (after converting that number back to it's original formay). Am
> I making any sense at all?
use Time::Local;
$datestr =~ m|^(\d+)/(\d+)/(\d+)$| or die;
my $now = timelocal(0,0,0, $2, $1, $3);
$now should have the number of seconds from the start of the epoch to
the current day. Use this for all your comparisons. Use localtime() or
gmtime() to convert the seconds back into human understandable units.
> I can write the routine to do all the grepping and necessary looping,
> but the date thing just has my undies in a bundle...
Ouch. Man, that's gotta hurt. HTH.
- doug
------------------------------
Date: 4 Sep 1997 14:43:18 GMT
From: jgloudon@bbn.com (Jason Gloudon)
Subject: Re: Erase line when using print (progres meter)
Message-Id: <5umhe6$e2m$1@daily.bbnplanet.com>
In article <340E8D27.59E2@theo.phy.uni-bayreuth.de>,
Eike Grote <eike.grote@theo.phy.uni-bayreuth.de> wrote:
>Hi,
>
>DeJean wrote:
>>
>> I would like to have a kind of progress meter for perl
>> I'm printing info to the screen like
>>
>> doing 1 of 10
>> doing 2 of 10
>> ...
> for(1..10) {
> print "\b$_";
A more generalized form of this would use something like
print"\rdoing $_";
where \r gets you back to the beginning of the line.
> sleep 1;
> }
> print "\nfinished\n";
>
>--
>======================================================================
> Eike Grote, Theoretical Physics IV, University of Bayreuth, Germany
>----------------------------------------------------------------------
> e-mail -> eike.grote@theo.phy.uni-bayreuth.de
> WWW -> http://www.phy.uni-bayreuth.de/theo/tp4/members/grote.html
> http://www.phy.uni-bayreuth.de/~btpa25/
>======================================================================
Jason Gloudon
------------------------------
Date: Thu, 04 Sep 1997 10:37:56 -0400
From: Hokee Chiu <chiue@nortel.ca>
Subject: ExtUtils package not in Activeware port
Message-Id: <340EC7C4.6F8B@nortel.ca>
I am trying to install some packages to WinNT port of perl,
from Activeware...
Apparently the ExtUtils package is missing.
I am using 5.003_07. I am wondering if I am missing something
here...
Also, I have downloaded a version of ExtUtils (for 5.004):
1. Is it compatible with 5.003?
2. The package is missing manifest.pm as well, which seems to
be important
Any help is greatly appreciated. Thanks in advance.
------------------------------
Date: Thu, 04 Sep 1997 15:25:04 GMT
From: williamw@rooster.igs.deleteTheRooster.net (William Wue(2xP)elma(2xN))
Subject: Re: Finding files - idiom?
Message-Id: <340ed0e9.7789659@news.igs.net>
On 3 Sep 1997 21:01:57 GMT, cberry@cinenet.net (Craig Berry) wrote:
>I am writing a Perl app which will take a filename argument, possibly
>containing wildcards, and search the current filesystem (from root on
>down) for files matching that argument.
>
>My current approach is to turn the filename arg into a Perl regex (for
>example, turning * into .*, ? into .), then traverse the filesystem using
>File::Find, recording the files whose names match the regex. This works
>just fine, but leaves me with the feeling that I'm overlooking some far
>more direct way to do this. If it matters, I'm writing this for DOS, but
>I'd certainly prefer a 'generic' solution.
>
>So, any suggestions? TIA...
Doesn't the glob() function do most of that?
e.g.
print("enter search string: ");
$string = <STDIN>;
chomp($string);
@files = glob("$string");
print("@files");
do that in each directory. Glob supports * and ?.
Probably not the most elegant way to do it, but it should work.
-------------------------
William Wue(2xP)elma(2xN)
Reply-To: williamw (at) igs (dot) net
--------------------------------------------------------------
It is pitch black. You are likely to receive spam from a grue.
------------------------------
Date: 04 Sep 1997 16:22:20 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: formatted reading?
Message-Id: <nqobu29upk3.fsf@mitra.phys.uit.no>
"(Al)fred Heller" <ajh@ibe.dtu.dk> writes:
> I can see from the answers that I have not explained enough.
> Do you have a better idea
unpack
> Alfred Heller
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Thu, 04 Sep 1997 10:07:30 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: formatted reading?
Message-Id: <340ECEB2.1129186F@gpu.srv.ualberta.ca>
(Al)fred Heller wrote:
>
> Hei all
>
> I would like to do a very simple thing - to read formatted lines from a
> file: e.g. position 1 is string1, from 2-5 is real number1, and so on..
> How can I achieve this goal?
you might want to look into the unpack() function, check
out the perlfunc manpage...
perldoc -f pack
perldoc -f unpack
regards
andrew
------------------------------
Date: 04 Sep 1997 16:00:31 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: FTP with perl
Message-Id: <nqoen75uqkg.fsf@mitra.phys.uit.no>
mweber@vt.edu (Matt Weber) wrote:
> Is there an easy perl script or module for FTPing something? It
> needs to be able to run on its own....log itslef in....transfer
> files and close the socket. The running on its own part will be
> done with crontabs. Any suggestions?
> >scott@radix.net (Scott Houck) writes:
> Maybe you should check out Expect.
> Tom Grydeland <tom@mitra.phys.uit.no> wrote:
> What on earth for? There's Net::FTP, you know. Works like a charm.
scott@radix.net (Scott Houck) writes:
> TMTOWTDI.
Sure, but when asked for +easy perl script or module for FTPing
something?;, does *expect* strike you as an obvious choice?
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 04 Sep 1997 16:45:56 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
To: maynard@gol.com
Subject: Re: grep-like search with multiple file output?
Message-Id: <nqoafhtuogr.fsf@mitra.phys.uit.no>
> Tom Grydeland <tom@mitra.phys.uit.no> wrote:
[script snipped]
> >Now that wasn't too hard, was it?
maynard@gol.com (Maynard Hogg) writes:
> Finally, a perl script that I can actually read! Here I thought the
> whole point to perl was to be as obscure and opague as possible. <g>
You could be fooled...
> One quibble: I'd get rid of the next statements since there is a
> possiblity that the same line might match one or more of the filtering
> patterns.
OK.
> Next question: How does one generalize this script to imitate AWK's
> associative arrays?
Why imitate them? Perl has those too. It just calls them hashes.
> BEGIN {
> #This implementation doesn't really have to store the outfile[]
> #array, but other file naming schemes might.
> pattern[++i] = "first pattern";outfile[i]=sprintf("out%05d",i)
> pattern[++i] = "second pattern";outfile[i]=sprintf("out%05d",i)
> ;
> }
Hmm. Those seem to be arrays, not hashes. (numerical vs. string indices)
> {
> for (j in pattern)
> if ($0 ~ pattern[j]) {
> print > file[j]
> close file[j] #How can you tell I'm a DOS person? <g>
> }
> }
I think I'd use a pattern -> filehandle mapping with a hash here:
(tested code)
#!/usr/bin/perl -w
use IO::File;
my $i = 0; # stop complaints from -w
# NB! need two backslashes for each backslash in the pattern
@patterns = ('first pattern', 'second pattern' '\\w+\\d{5}');
# open a file for each pattern, numbered sequentially
foreach $pattern (@patterns) {
$file{$pattern} = IO::File->new(sprintf(">out%05d", ++$i));
}
while (<>) { # use explicit looping over input files this time
foreach $pattern (keys %file) {
if (/$pattern/) {
print {$file{$pattern}} $_;
}
}
}
Of course, this approach means you have to recompile the regexes each
time through the loop. It is possible to combine the /o
(compile-once) with dynamically allocated patterns, using closures,
but that could take this little task out of the "readable" end of the
spectrum. It would conceivably run a lot faster, though, particularly
if your input or list of patterns is large enough.
If people are really interested, I'll sketch out such a solution.
> |\^/| Maynard Hogg
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 04 Sep 1997 16:51:12 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: grep-like search with multiple file output?
Message-Id: <nqo7mcxuo7z.fsf@mitra.phys.uit.no>
maynard@gol.com (Maynard Hogg) writes:
> Finally, a perl script that I can actually read! Here I thought the
> whole point to perl was to be as obscure and opague as possible. <g>
>
> One quibble: I'd get rid of the next statements since there is a
> possiblity that the same line might match one or more of the filtering
> patterns.
In that case, the body will be even simpler:
/pat1/ && print OUT1 $_;
/pat2/ && print OUT2 $_;
/pat3/ && print OUT3 $_;
> |\^/| Maynard Hogg
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Thu, 04 Sep 1997 09:36:45 -0600
From: duesterwald@gei-aachen.de
Subject: How do I embed C in Perl
Message-Id: <873377199.4853@dejanews.com>
Hi folks!
I need to embed C in a perl script. What do I need to do?
Which are the most helpful tools and modules?
Thank you,
Marc
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Thu, 04 Sep 1997 15:24:55 GMT
From: williamw@rooster.igs.deleteTheRooster.net (William Wue(2xP)elma(2xN))
Subject: Re: How to open a file for both read and write
Message-Id: <340ec977.5883244@news.igs.net>
On Wed, 3 Sep 1997 18:56:28 -0500, tadmc@flash.net (Tad McClellan)
wrote:
>Songtao Chen (songtao@nortel.ca) wrote:
>
>: Could anyone tell me how to open a file for both
> ^^^^^^^^^^^
> ^^^^^^^^^^^
>: read and write ?
>
>Yes. The free documentation that is included with the perl
>distribution can tell you how to do that.
open(HANDLE, "+>myfile.txt")
open(HANDLE, "+<myfile.txt")
The first will create a new file or overwrite an existing file (i.e.
deletes the existing contents.) The second one opens an existing file.
and does not delete the contents. There are a few others, like
">>myfile.txt", but those are the basics.
BTW, you really SHOULD read the documentation that comes with Perl
before asking a basic question like this. The rest of us had to figure
it out the hard way, and it really is the best way to learn. On the
other hand, it does kind of annoy me that people will take the time to
flame you for not RingTFM, but not to answer a simple question.
-------------------------
William Wue(2xP)elma(2xN)
Reply-To: williamw (at) igs (dot) net
--------------------------------------------------------------
It is pitch black. You are likely to receive spam from a grue.
------------------------------
Date: 4 Sep 1997 14:48:01 GMT
From: "Gary Ng" <garyng@ibm.net>
Subject: Re: Is Perl for Win32 really as brain damaged as it seems?
Message-Id: <01bcb941$99f1ba60$901952ca@dkkong>
Tom Phoenix <rootbeer@teleport.com> wrote in article
<Pine.GSO.3.96.970903125057.11990O-100000@julie.teleport.com>...
>
> (Speculation alert.) I _think_ that a command in backticks is
(sometimes?)
> handed off to the command-line processor, COMMAND.COM, which may be the
> culprit here. (But I don't know why _anything_ should be running the
> floppy drive here.) Does this happen with Sarathy's most recent binary?
>
Any chance that there is a A:\ in the PATH ?
------------------------------
Date: 4 Sep 1997 15:54:39 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: Re: Is Perl for Win32 really as brain damaged as it seems?
Message-Id: <5umljv$i5q@srvr1.engin.umich.edu>
In article <340dcdc3.15268738@news.supernews.com>,
Ronald L. Parker <ron@farmworks.com> wrote:
>Does this happen with Sarathy's most recent binary?
>>
>> http://www.perl.com/CPAN/authors/id/GSAR/
>
>Yes, it does (Perl 5.004_02 bindist 04).
Strange, it doesn't happen for me (under Windows NT 4.0).
- Sarathy.
gsar@umich.edu
------------------------------
Date: Thu, 04 Sep 1997 16:33:16 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: IS there a 'strlen' in Perl?
Message-Id: <340EC6AC.547E3DB8@absyss.fr>
Mike Powell wrote:
>
> Jun Zhuang wrote:
>
> > Is there a function like 'strlen()' in C in Perl5?
> > I just want to use it to count the chars in a char string.
>
> I think Perl uses length() to do that. That's what I've
> used for things like substr() and dropping that annoying
> end of line character at the end (e.g. length()-1).
You could delete the last character more easily with
substr($string, -1) = '';
Negative indicies count from the right (end of the string) and substr()
produces a lvalue (something that you can assign to).
But there are even better tools than this. Look up "chop" and "chomp"
in the perlfunc man page for stuff you may have overlooked.
- doug
------------------------------
Date: 4 Sep 1997 14:21:32 GMT
From: bdwheele@indiana.edu (Brian Wheeler)
Subject: Re: IS there a 'strlen' in Perl?
Message-Id: <5umg5c$ed3$3@dismay.ucs.indiana.edu>
In article <340EB58D.6F13@rt66.com>,
Mike Powell <mikep@rt66.com> writes:
>Jun Zhuang wrote:
>
>> Is there a function like 'strlen()' in C in Perl5?
>> I just want to use it to count the chars in a char string.
>
>I think Perl uses length() to do that. That's what I've
>used for things like substr() and dropping that annoying
>end of line character at the end (e.g. length()-1).
why not just use chop? Or better yet, chomp. :)
Brian
------------------------------
Date: Thu, 4 Sep 1997 11:24:25 -0500
From: Jason <jason@ernie.liglobal.com>
Subject: Password Verification Case Sensitivity
Message-Id: <Pine.LNX.3.91.970904112101.1120A-100000@ernie.liglobal.com>
Please Help Me:)
I have a web chat system running solely on perl which has case sensitive
user id and password verification. I would rather the user be able to login
without worrying about what case they have entered their user id in.
Any ideas?
-Jason Morgenstern
btw if you'd like to check it out.. here's a shameless plug
http://www.longislandteens.org/chat
------------------------------
Date: Thu, 04 Sep 1997 15:24:59 GMT
From: williamw@rooster.igs.deleteTheRooster.net (William Wue(2xP)elma(2xN))
Subject: Re: Perl (kind of) math question.
Message-Id: <340eccc0.6724081@news.igs.net>
On Tue, 2 Sep 1997 10:44:14 -0700, Tom Phoenix <rootbeer@teleport.com>
wrote:
>
>On Tue, 2 Sep 1997, Doug Seay wrote:
>
>> But since French has single words for numbers up through 16, maybe the
>> ancient French (Gauls? Gallo-Roman?) used hexadecimal. I asked my wife
>> (both French and a software engineer) about this once and she rejected
>> it out-of-hand.
>
>Actually, French uses nearly a base-twenty system. The French word for
>eighty-seven is really saying "fourscore and seven".
That's actually just an exception in the naming convention. The French
for twenty, thirty, forty, fifty and sixty are separate terms. seventy
is "sixty-ten" and eighty is "four twenties", with ninety being "four
twenties ten" (99 being "four twenties nineteen") Numbers lower than
70 follow the pattern that English-speakers are familiar with. It's
just an exception, probably a holdover from a much earler time.
English is no better. Once we break the 999 999 999 mark, we have
trouble agreeing on whether the next number is "one billion" or "a
thousand million". Actually, we sometimes have trouble agreeing on
whether "1500" is "one thousand, five hundred" or "fifteen hundred"
for that matter.
-------------------------
William Wue(2xP)elma(2xN)
Reply-To: williamw (at) igs (dot) net
--------------------------------------------------------------
It is pitch black. You are likely to receive spam from a grue.
------------------------------
Date: Thu, 04 Sep 1997 18:31:03 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: Perl (kind of) math question.
Message-Id: <340EE247.6BED3EB0@absyss.fr>
William Wue(2xP)elma(2xN) wrote:
>
> On Tue, 2 Sep 1997 10:44:14 -0700, Tom Phoenix <rootbeer@teleport.com>
> wrote:
>
> >Actually, French uses nearly a base-twenty system. The French word for
> >eighty-seven is really saying "fourscore and seven".
>
> That's actually just an exception in the naming convention. The French
> for twenty, thirty, forty, fifty and sixty are separate terms. seventy
> is "sixty-ten" and eighty is "four twenties", with ninety being "four
> twenties ten" (99 being "four twenties nineteen") Numbers lower than
> 70 follow the pattern that English-speakers are familiar with. It's
> just an exception, probably a holdover from a much earler time.
But usually the "holdovers" are how things used to be done. It wouldn't
surprise me if the "ancient French" used base 20 system and switched to
base 10 when the decimal using Romans arrived. The commonly occuring
lower "tens-place" were modified, but the less common higher ones
(namely 70, 80 and 90) never really got converted. But I'm just
shooting from the hip on this one.
> English is no better. Once we break the 999 999 999 mark, we have
> trouble agreeing on whether the next number is "one billion" or "a
> thousand million". Actually, we sometimes have trouble agreeing on
> whether "1500" is "one thousand, five hundred" or "fifteen hundred"
> for that matter.
There is no problem here, as long as you consider "english" to be a
family of languages. Americans use thousand, million, billion and
trillion while the Brits use thousand, million, thousand million and
billion. This being much closer to the French "mill", "million",
"milliard", and "bill mumble mumble muble" (don't know the ending).
Using fifteen hundred instead of one thousand five hundred is just
personal choice. That isn't the same type of difference as "thousand
million".
- doug
------------------------------
Date: Thu, 04 Sep 1997 09:41:16 -0400
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: perl and XEmacs
Message-Id: <fl_aggie-ya02408000R0409970941160001@news.fsu.edu>
In article <bcilo1ecexx.fsf@corp.Sun.COM>, Gary.Foster@corp.Sun.COM (Gary
D. Foster) wrote:
+ >>>>> "Chris" == Chris Nandor <pudge@pobox.com> writes:
+
+ Chris> I know this was all supposed to be humourous, but it wasn't
+ Chris> particularly funny.
+
+ Depends on your sense of humor, now doesn't it?
Let's see if I got this right: you attribute perl to anti-semetic
Nazis, and then get miffed when perl users object?
Ok, maybe I'm humor-impaired. Please explain to me, which part of
+ Perl is for nazi's and oppresion.
is supposed to be funny?
James - I'm laughing, I'm telling you...
--
Consulting Minister for Consultants, DNRC
Support the anti-Spam amendment <url:http://www.cauce.org/>
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>
------------------------------
Date: 4 Sep 1997 15:16:53 GMT
From: "Miran Sepic" <miran.sepic4@mss.tel.hr>
Subject: Perl with Microsoft Developer Studio?
Message-Id: <01bcb945$583bb040$7a02a8c0@pc_miran>
I heard that Perl for Win32 could be used wihin MDS. I it is possible, does
anybody knows how?
Thanks
------------------------------
Date: Thu, 04 Sep 1997 13:54:03 GMT
From: ron@farmworks.com (Ronald L. Parker)
Subject: Re: Simple Perl for Win 32 Question (not in FAQ)
Message-Id: <340ebd47.4163341@news.supernews.com>
On 3 Sep 1997 14:34:00 -0700, klander@primenet (Kevin) wrote:
>On Wed, 03 Sep 1997 20:42:42 GMT, ron@farmworks.com (Ronald L. Parker)
>wrote:
>
>>On 2 Sep 1997 15:23:01 -0700, klander@primenet (Kevin) wrote:
>>
>>>$filename =~ /^(.+\\)(.*)$/; # <-- extracts path and filename into $1
>>> # and $2
>>>
>>>$fpath = $1;
>>>$fname = $2;
>>
>>Doesn't work for $filename eq '\\autoexec.bat'
>>
>Oops. You're right. Take out the ^ anchor.
Actually, you need the ^ anchor. Change the + to a *.
--
Ron Parker
Software Engineer
Farm Works Software Come see us at http://www.farmworks.com
For PGP public key see http://www.farmworks.com/Ron_Parker_PGP_key.txt
------------------------------
Date: Thu, 04 Sep 1997 10:38:37 -0400
From: Gina Anderson <ginakra@one.net>
Subject: test CGI's wwithout uploading to ISP w/Frontpage 97
Message-Id: <340EC7ED.D5A551EF@one.net>
Hello all!
I have a question, I hope I am in the right newsgroup..I have also
forwarded this question to other groups.
I am just starting to use Perl 5 for making cgi programs for my web site
(among just needing to know it period for getting a job!). I am
planning on making a simple guestbook and stuff for now. (for any of you
noticing my site is on AOL in my sig, that will change as soon as I
learn this)
My question is, I have Microsoft Frontpage 97 installed on my machine
(IBM running Win 95), and Inet server, which will of course allow me to
preview my site using links without being connected to the internet.
BUT, I was wondering if I could set it up somehow so I could test the
cgi programs I make. For example, as I preview my site, I could fill in
the guestbook form, submit, and see the actual output of the cgi program
without being connected to the internet. I would love to be able to do
this so I wont have the headache of uploading it to my ISP's server to
test, making changes and doing it all over again!
I have Perl 5 for Windows 95/NT installed on my computer, inetsw95.exe
is in C:\programfiles\websvr\system and Perl 5 is in D:\Perl5.
Can anyone answer this question and tell me how to set this up so it
will work?
Thanks so much for any help you can give!
Gina Anderson
--
_\/_ | _\/_
/o\\ \ / //o\
| .-'-. |
_|_______ -- / \ -- ______|__
jgs `~^~^~^~^~^~^~^~^~^~^~^~`
Gina Anderson ginakra@one.net
http://members.aol.com/ginakra
Need a web page?
Contact Me For Affordable Rates!
------------------------------
Date: Thu, 04 Sep 1997 09:13:12 -0700
From: Rich Yumul <chewie@dtai.com>
Subject: What's the difference b/w Oraperl versions?
Message-Id: <340EDE18.9B77EEBE@dtai.com>
Hi - can anybody tell me what the differences are in the DBD-Oracle
modules at
ftp://ftp.spu.edu/pub/CPAN/modules/by-module/Oraperl/
??
There are several versions to download:
DBD-Oracle-0.40.tar.gz
DBD-Oracle-0.43.tar.gz
DBD-Oracle-0.44.tar.gz
DBD-Oracle-0.45.tar.gz
DBD-Oracle-0.46.tar.gz
What's the difference between them?
I'd appreciate it if whoever knows to email me the answer.
Thanks in advance,
Rich Yumul
chewie@dtai.com
------------------------------
Date: Thu, 4 Sep 1997 14:00:45 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: WHY doesnt this work ??
Message-Id: <EFzLL9.CEo@world.std.com>
cowbys@aol.com (COWBYS) writes:
>why doesnt this code work?, it should.
[stuff deleted]
>opendir( WEBAPPS, "$webappdir") || die "Cant open $webappdir !!, $!" ;
>@APPS = readdir(WEBAPPS);
> foreach $file (@APPS) {
> if (-f $file) {
> print DELFTP "del $file \n"; }
>
> }
The readdir() function returns the files names in the directory
specified by opendir(). It does not return a full file specification,
nor does it chdir() to the directory.
You might want to pre-pend the directory name to the file.
if (-f "$webappdir/$file") {
print DELFTP "del $webappdir/$file \n"; }
}
--
Andrew Langmead
------------------------------
Date: 4 Sep 1997 15:46:18 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: Re: Win32/ Perl -S (pl2bat)
Message-Id: <5uml4a$hmt@srvr1.engin.umich.edu>
[ mailed and posted ]
In article <340DC128.5709@apl.washington.edu>,
Axel Schweiger <axel@apl.washington.edu> wrote:
>I am having problems getting the pl2bat or its derivatives to work on
>my Windows 95 machine. I am using the latest built from Activeware:
>
>Win32 Build 307 (5.0003_07)
>
>The problem seems to be that pl2bat (or equivalents) insert the
>-S command. On my machine perl -S test.pl yields:
> can't execute test.pl. When I edit out -S things actually do work.
The pl2bat that comes with the latest official perl will work
much better. 5.004_02 and later also have several fixes to the
-S support to make it work. Get precompiled 5.004_02 and other
goodies for Win95/WinNT at:
$CPAN/ports/win32/Gurusamy_Sarathy/perl5.00402-bindist04-bc.tar.gz
- Sarathy.
gsar@umich.edu
------------------------------
Date: Thu, 4 Sep 1997 14:22:05 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Wrote new module, need help with system dependencies.
Message-Id: <EFzMKu.5w8@world.std.com>
Zenin <zenin@best.com> writes:
> I'd recommend taking a look at the Configure script for perl itself.
> It includes a byte order test of some kind that I'm sure you could
> convert into perl or C without much problem.
If you're going to do that, why not use the results that perl's
Configure has already collected.
use Config;
$Config{byteorder};
--
Andrew Langmead
------------------------------
Date: Thu, 04 Sep 1997 08:59:36 -0400
From: Jeremy Finke <webmaster@mid-states.com>
Subject: yesterday's date
Message-Id: <340EB0B7.4DA9755E@mid-states.com>
Hello all-
I have a question that I am having difficulty with. I have a script
that parses through a group of files that have date formats in them. I
have this working all right. My problem now comes from the fact that
one of the fields has the previous day's date. Is there an easy way to
get yesterday's date from the system. I was subtracting one from
today's date, but the problem there is that if it is the first of the
month then I get a result of zero of the same month. Also I really do
not want to hard code in all of the months with which ones have 30 or 31
days as well as February and all of the leap year problems.
TIA!!
Jeremy Finke
------------------------------
Date: Thu, 04 Sep 1997 16:47:44 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: yesterday's date
Message-Id: <340ECA10.109586CB@absyss.fr>
Jeremy Finke wrote:
>
> I have a question that I am having difficulty with. I have a script
> that parses through a group of files that have date formats in them. I
> have this working all right. My problem now comes from the fact that
> one of the fields has the previous day's date. Is there an easy way to
> get yesterday's date from the system. I was subtracting one from
> today's date, but the problem there is that if it is the first of the
> month then I get a result of zero of the same month. Also I really do
> not want to hard code in all of the months with which ones have 30 or 31
> days as well as February and all of the leap year problems.
Convert the date to seconds (perldoc Time::Local for details), subtract
60*60*24 seconds and convert back to your format. Also, on CPAN there
is a date manipulation module that should have stuff for doing this
(dunno, I've never used it).
- doug
PS - My solution doesn't handle leap seconds, but most people don't care
about them anyway.
------------------------------
Date: 4 Sep 1997 16:03:21 GMT
From: sohara@mardil.elsevier.nl (Steve O'Hara Smith)
Subject: Re: yesterday's date
Message-Id: <5umm49$j12$1@ns.elsevier.nl>
Jeremy Finke (webmaster@mid-states.com) wrote:
: Hello all-
A fairly easy way to do it is
$now = time;
$this_time_yesterday = $now - 86400; #(24 * 60 * 60);
@all_the_bits = localtime $this_time_yesterday;
and work it up from there.
Steve
------------------------------
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 975
*************************************