[6542] in Perl-Users-Digest
Perl-Users Digest, Issue: 167 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 24 09:07:17 1997
Date: Mon, 24 Mar 97 06:00:28 -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 Mon, 24 Mar 1997 Volume: 8 Number: 167
Today's topics:
Re: A Call for Clarity (Schwartzian Transform Considere Steve_Kilbane@cegelecproj.co.uk
ADVICE NEEDED: timelocal() prints wrong result (VK2COT)
Can't unsubscribe from Perl Users ... ("Laurent BAILLY")
Re: case sensativity (Tad McClellan)
Re: case sensativity (Andrew M. Langmead)
Casting in Perl <German.CancioMelia@cern.ch>
Re: Casting in Perl (M.J.T. Guy)
CGI Programmer Needed <freemana@usit.net>
Re: dereferencing an object in a hash? (Nathan V. Patwardhan)
easy money <arlenny@msn.com>
Re: Help with so called Virtual Classes <kevina@clark.net>
Re: How can I find the current working directory? <tchrist@mox.perl.com>
Re: Is CGI a part of or similiar to Perl? <pmflynn@ix.netcom.com>
Re: Makefile.PL in Win95...where/what should I use for (Brian Jepson)
Module or script of data checking routines? (David Hawkins)
Re: ODBC package problem (Donovan Janus)
Re: printf... <dehon_olivier@jpmorgan.com>
Re: regex in perl4 (Jeffrey)
subdirectories (Berhin Jean-Francois)
Re: subdirectories (Honza Pazdziora)
Re: text to HTML <tom@nospam.eiscat.no>
Re: Uninitialized "next" with -w ? (M.J.T. Guy)
Re: What's a good Perl book? <tom@nospam.eiscat.no>
Re: Who makes more $$ - Windows vs. Unix programmers? augie@cdc3.cdc.net
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 24 Mar 1997 10:00:26 GMT
From: Steve_Kilbane@cegelecproj.co.uk
Subject: Re: A Call for Clarity (Schwartzian Transform Considered Scary)
Message-Id: <5h5jbq$6n7$1@jupiter.sdd.cegelecproj.co.uk>
Hey, guess what: everyone's right. There are degrees, though.
I'd say that the ST is scarey because it's a non-obvious idiom,
implemented using highly generic operations (map, mainly),
not because of the magic involved in the implementation.
Different languages have different fundamentals, and you get
to understand them. In Perl, sort's $a and $b or regexps' $1
aren't much more magical than +, because they're so common.
The ST is a little dodgy, because it's quite large - if you're reading
someone else's code, you'd have to check that it *does* do ST, rather
than saying "map...sort..map..uh, ST" - the maps could be there for
other purposes. For that reason, I'd say "comment it". Say it's an ST,
and what it's sorting on, and give some pointer or explanation for the
ST itself. But that's not a reason for dumbing it down.
--
<Steve_Kilbane@cegelecproj.co.uk> - All opinions are mine alone.
Kilbane's law of integration: standardise on protocols and file
formats, and the applications take care of themselves.
------------------------------
Date: Mon, 24 Mar 1997 05:38:19 GMT
From: dusanb@syd.csa.com.au (VK2COT)
Subject: ADVICE NEEDED: timelocal() prints wrong result
Message-Id: <E7J8zv.HI@syd.csa.com.au>
Hello,
I admit I might be over-streched atd exhausted at the present time. I hope
I am not asking a question that has obvious answer. I have done a search
through FAQs, Manuals and Perl books. Alas, I am still looking for a solution.
I have written a Perl5 script (I am running Solaris 2.5.1 with Perl 5.003) which calculates differences between certain dates. It all works fine, except that the
results are wrong when timelocal() is used on dates that start in different months.
Here is a piece of code that demonstates the problem:
#!/opt/local/bin/perl
use Time::Local;
$AAA = timelocal(37, 53, 04, 1, Mar, 97);
$BBB = timelocal(37, 53, 22, 27, Feb, 97);
$CCC = ($AAA - $BBB) > 0 ? ($AAA - $BBB) : abs($AAA - $BBB);
$DDD = $CCC / 3600;
printf("%d - %d = %d (%s hours)\n", $AAA, $BBB, $CCC, $DDD);
exit(0);
As a result I get:
852054817 - 854366017 = 2311200 (642 hours)
Totally wrong! Of course, if I specify two dates within the same month, it works
properly.
I am aware of other Perl5 date manipulation modules. At this stage, I would like
to "stick" to standard Perl5 (if possible). Is there something I can do to make
sure that timelocal() always returns the corect answer (even for dates in different
months).
Thank you in advance for any comment (I hope my "crazy" problem
--
Dusan U. Baljevic, Senior Member TechStaff
CSC Australia, dusanb@syd.csa.com.au
------------------------------
Date: Mon, 24 Mar 1997 09:51:24 +0100
From: lbailly@axime.com ("Laurent BAILLY")
Subject: Can't unsubscribe from Perl Users ...
Message-Id: <199703240952.JAA05084@mailhost.axime.com>
Hi,
I can't unsubscribe from perl-users :
"## Regarding your request:
unsubscribe perl-users
Unable to locate address '"Laurent BAILLY" <lbailly@axime.com>' in alias
list 'perl-users.' "
I'm afraid my email has been registered as lbailly@mailhost.axime.com, bu=
t
the name server changed, and I'm now registered as lbailly@axime.com
It should be nice if you could unsubscribe me, because I still receive th=
e
Perl Users Digests.
thanks in advance.
Laurent BAILLY - Caisse d'Epargne de Flandre
Chef de projet Internet
T=E9l: +33 0320666044 - Fax: +33 0320666469
------------------------------
Date: Sat, 22 Mar 1997 21:42:26 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: case sensativity
Message-Id: <2r82h5.vf.ln@localhost>
mirage@tsil.net wrote:
: Is there anyway to keep Perl, Java, JavaScript, etc from being
: case sensitive?
: Is there any actual use of case sensitivity or is this yet another
: unfortunate instance of the carry-over of one of C's worst language
: features? I know C is case sensitive because of it's origin as a
: replacement for assembly language which uses macros.
: I don't know about others but I find mixed case greatly improves
: script readability. Why do people keep developing new languages that
: omit this freedom? I am so used to having the flexibilty of mixing my
: case in other languages that it makes working with C, Perl, Java,
: etc, such a chore.
This has got to be a troll.
Right?
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Mon, 24 Mar 1997 12:38:55 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: case sensativity
Message-Id: <E7JsGv.F7D@world.std.com>
jtbell@presby.edu (Jon Bell) writes:
> Andrew M. Langmead <aml@world.std.com> wrote:
>>mirage@tsil.net writes:
>>
>>>Is there anyway to keep Perl, Java, JavaScript, etc from being
>>>case sensitive?
>>
>>I think that I'm missing something, first you compain about perl
>>et. al. being case sensitive. (That the identifers, $VAR, $Var, and
>>$var are different.) and then complain that you can't use mixed case
>>(To me implying that you must use $var, and the identifiers $VAR or
>>$Var are illegal.)
>No, he's saying that he wants (for example) $var, $VAR, $Var, $VaR, etc, to
>all refer to the same variable. This is the way Pascal works. I bet
>that's the language he's coming from.
Yes, I know how Pascal works. (In this specific instance, I know the
format for Pascal identifiers, but also in general, I know how Pascal
works.) I know how I just don't see why he needs to have case
inconsistancy for the same identifier to suit the his stated goal "I
don't know about others but I find mixed case greatly improves script
readability."
He can use mixed case. He just needs to keep consistant when refering
to the same variable. I don't see why he is complaining he can't.
Again, I don't feel strongly enough about case sensitive identifiers
to defend why the language _must_ have them, but on the other hand, I
have never thought of them being a problem to complain about.
--
Andrew Langmead
------------------------------
Date: Mon, 24 Mar 1997 08:15:40 GMT
From: German Cancio Melia <German.CancioMelia@cern.ch>
Subject: Casting in Perl
Message-Id: <3336382C.2C82@cern.ch>
Hello,
I'm in need of doing a casting in Perl but I don't know how.
Suppose I've got a class A, with methods M1 and M2, and M1 calling
M2.
Now, I create a class B which inherits from A, also with methods M1 and
M2 which override M1 and M2 from A. In method M1 I have to call
A->M1. The problem is that M1 from A will call M2 from B where it is
supposed to call M2 from A!!
Is there a way to avoid this??
Thanks
german
--
------------------------------------------------------
German Cancio Melia IT - DCI CERN - 1211 Geneva 23
Phone: +41 2276 79801 mail: German.Cancio@cern.ch
------------------------------------------------------
------------------------------
Date: 24 Mar 1997 09:51:04 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Casting in Perl
Message-Id: <5h5iq8$eup@lyra.csx.cam.ac.uk>
German Cancio Melia <German.CancioMelia@cern.ch> wrote:
>I'm in need of doing a casting in Perl but I don't know how.
>Suppose I've got a class A, with methods M1 and M2, and M1 calling
>M2.
>Now, I create a class B which inherits from A, also with methods M1 and
>M2 which override M1 and M2 from A. In method M1 I have to call
>A->M1. The problem is that M1 from A will call M2 from B where it is
>supposed to call M2 from A!!
Just call M2 explicitly as a subroutine, i.e. instead of
$obj->M2(@args):
write
A::M2($obj, @args);
Mike Guy
------------------------------
Date: 24 Mar 1997 05:12:15 GMT
From: "Aaron Freeman" <freemana@usit.net>
Subject: CGI Programmer Needed
Message-Id: <01bc3811$ae4e5560$26c3f1cd@freemana>
Hi,
My name is Aaron Freeman. We are looking for a free lance writer to
assist your present programmer in speeding up the building of one of the
biggest ladder sites in the world. Ranked #2! http://www.gamewar.com
If you are interested in doing scripts for free
OR
doing scripts for us in trade of us building a webpage for you or hosting
your pages unlimited space. Please reply to this if you are interested. And
please send a url or something so we can view what you can do and also send
your building rate for a mid complex script.
Aaron Freeman
http://www.gamewar.com
Internet Game War
Ranked #2 in the World
------------------------------
Date: 24 Mar 1997 05:23:54 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: dereferencing an object in a hash?
Message-Id: <5h535a$45s@fridge-nf0.shore.net>
Arpad Geller (arpad@tezcat.com) wrote:
: foreach $key (@names) {
: print "key = $key value = ", $query->param($key), "\n";
: $Quest{$key} = {$query->param($key)};
: }
[snip]
How about:
foreach $key ($query->param) {
print $key, " -> ";
@values = $query->param($key);
print join(',', @values),"\n";
}
--
Nathan V. Patwardhan
nvp@shore.net
------------------------------
Date: Sun, 23 Mar 1997 19:07:29 -0800
From: "Arlene Sintzel" <arlenny@msn.com>
Subject: easy money
Message-Id: <01bc025d$ad8dd9a0$24aa2299@arlen>
Taking 5 minutes to read what follows could be one of the best decisions
you have ever made.
READ THIS!!!!
I saw an article in an internet newsgroup telling me that I could make
$50,000 within a month for an investment of only $5.
I thought it was a huge joke. I spoke to my attorney, friends and family
about it, and they all agreed it was some kind of scam. I can't stand
scams, because usually someone gets burned, and I didn't want it it to be
me. After rejecting the idea at first, I realized all I had to lose was
the $5 in my wallet. I figured what the heck, and decided to give it a
shot.
A friend told me that he invested $5 and two weeks later he began receiving
money in the mail! Soon, hundreds, and then thousands of dollars began to
roll in. Within 4 weeks, he had received a total of $32,445! It came from
everywhere in the world.
If you follow the three steps below, there is no reason why the same
shouldn't happen to you! This is a legitimate investment opportunity. You
invest $5, and you receive a return on your investment. So does the next
investor.
NOT ILLEGAL, NOT A CHAIN LETTER - PERFECTLY LEGITIMATE.
If you are not interested, then don't participate, but please print this
article and pass it on to someone who may be interested, so they can take
advantage.
The procedure is simple:
1) Write your name, address, and country on 5 sheets of paper. Below
that, write the words, "Please add me to your mailing list." This creates a
service out of this money making system and thus making it completely
legal. You are not just randomly sending a dollar to someone, you are
paying one dollar for a legitimate service. You should use thick dark
paper to discourage mail theft. Fold a $1 bill in each piece of paper, (no
checks or money orders). The folding of the paper around the bill will
insure its arrival to its recipient.
THIS STEP IS IMPORTANT!! and mail them to the following 5 addresses:
1. Binti Jua Hayes
616 NW 22nd St.
Wilton Manors, FL 33311
2. Iffat Ara Sadique
183-11, Hillside Ave., Apt 6K
Jamaica Estates, NY 11432
3. Adam Gross
4730 Pond Creek Road
Alexandria, KY 41001-9766
4. Roger. Romero
7121B Dakota Ave.
Fairchild AFB, WA 99011
5. Susan Walther
910 Waybourne Way
Lake Mary, FL 32746
2) Now remove the top name from the list, and move the other four names
up. In other words, #5 becomes #4 and so on. Put your name as the fifth
one on the list. You can do this by simply retyping the article or
reposting it to other newsgroups with the edited addresses.
3) Post the article to at least 200 newsgroups. There are 19,000, so it
shouldn't be hard to find that many.
LET'S ALL TAKE CARE OF EACH OTHER BY BEING HONEST AND BY PUTTING FORTH 120
PERCENT INTO THIS PROFITABLE & AMAZING SYSTEM!!! You'll reap the benefits,
believe me!!!
If you can UUE encode the file when uploading, that will make it easier
for the people to receive it and have it downloaded to their hard drive.
That way they get a copy of the article right on their computer without
hassles of viewing and then saving the article from the File menu. Don't
alter the file type, leave it as an MS-DOS Text file. The best test is to
be able to view this file using Microsoft's
Notepad for Windows 3.x or WordPad for Windows '95. If the margins look
right without making the screen slide left or right when at the ends of the
sentences, you're in business!
You are now in the mail order investment business, and should start seeing
returns within a week or two. Of course, the more newgroups you post to,
the greater your return will be. If you wish to remain anonymous, you may
use a psuedonym, but make sure your address is correct.
Now, here is why the system works:
The internet is growing at a tremendous rate - it doubles in size every 4
months. Think about it. You see those 'Make Money Fast' posts more and
more. All that growth means profits for everyone who participates. There
are no losers.
Of every 200 posts I made, I received 5 responses. Yes, only 5. You make
$5 for every 200 posts with your name at #5.
Each person who sent you $1 now also makes 200 additional postings with
your name at #4. ie. 1000 postings. On average therefore, 50 people will
send you $1 with your name at #4. $50.
Your 50 new agents make 200 postings each with your name at #3 or 10,000
postings. Average return 500 people=$500. They make 200 postings each
with your name at #2=100,000 postings=5000 return at $1 each=$5000.
Finally, 5,000 people make 200 postings with your name at #1 and you get a
return of $50,000 before your name drops off the list. AND THATS IF
EVERYONE DOWN THE LINE MAKES ONLY 200 POSTINGS! Total income in one cycle
= $55,000.
>From time to time, when you see your name no longer on the list, you take
the latest posting that appears in the newsgroups, and send out another $5,
and put your name at #5, and start posting again. Remember, 200 postings
is only a guideline. The more you post, the greater the return.
Lets review why you should do this. THE ONLY COST IS $5, AND 5 STAMPS, AND
5 ENVELOPES. Anyone can afford $5 for such an effortless investment with
such SPECTACULAR RETURNS.
Some people have said to me, "what happens if the scheme is played out and
no one sends me any money?" Big Deal, so you lose $5 - but what are the
chances of that happening??
There are millions of internet users, and millions of new net surfers every
month.
Remember - read the instructions carefully, and play fairly. That's the
only way this will work. Get a printout so you can refer back to this
article easily.
Try to keep a list of everyone that sends you money and always keep an eye
on the postings to make sure everyone is playing fairly. You know where
your name should be.
REMEMBER - HONESTY IS THE BEST POLICY.
WHAT ARE 5 DOLLARS TO YOU?
YOU DO NOT NEED TO CHEAT THIS IDEA TO MAKE MONEY!!! This is the easiest
way that you can make a buck. Think how excited you'll be to open up your
mailbox day after day! Will it be $49? $122? Start making your plans,
because it can happen to you.
--------------------------------------------------------------------------
Extra section:
HOW TO POST TO NEWSGROUPS FAST WITH YOUR WEB BROWSER:
If you have Netscape 3.0 do EXACTLY the following:
1) Click on any newsgroup like normal, THEN click on 'TO NEWS', which is
on the far left when you're in the newsgroups page. This will bring up a
box to type a message in.
2) Leave the newsgroup box like it is, CHANGE the subject box to something
flashy, like, "NEED CASH $$$ READ HERE $$$ or "FAST CASH"!!!
3) Tab once and you should be ready to type. Now, retype (only once) THIS
whole article WORD FOR WORD, except insert your name at #5, and remove #1
off the list, plus any other small changes you think you need to make.
Keep almost all of it the SAME!
4) When you're done typing the WHOLE article, click on FILE in THIS BOX,
RIGHT ABOVE SEND, NOT WHERE IT SAYS NETSCAPE NEWS ON THE FIRST BOX.
Click on SAVE AS when you're under FILE. Save your article as a text file
to your C: or A: drive. DO NOT SEND OR POST YOUR ARTICLE UNTIL YOU DO
THIS. Once saved, move on to number 5 below.
NOTE: If you don't want to type in the whole article by hand, AND you know
how to use a plain text editor (like Notepad), you can edit the file ahead
of time, then attach it as shown in step 6.
5) If you still have all of your text, send or post to this newsgroup now
by just clicking send, which is right below FILE, and right above Cc:
6) Here's where you're going to post all 200. OK, click on any newsgroup
then click on 'TO NEWS', again in the top left corner. Leave the
NEWSGROUPS BOX alone again, put a flashy subject title in the SUBJECT BOX,
hit TAB once you're in the body of the message.
Click on ATTACHMENTS, which is below the SUBJECT BOX. You will get another
box to come up. Click on ATTACH FILE, then find YOUR file that if you did
this right, you should see your file name in the attachments box, and it
will be shaded green.
NOTE: If you don't want to type in the whole article and you know how to
use a plain text editor (Notepad), you can edit the file ahead of time,
then attach it.
IF YOU USE IE EXPLORER IT'S JUST AS EASY...HOLDING DOWN THE LEFT MOUSE
BUTTON, highlight this article. Then press the "ctrl" key and the "c" key
at the same time to copy this article. Then print this article for your
records, to have the names of those you will be sending $1 bills to.
2) Go to the news groups and press "post an article". A window will
open. Type in your headline in the subject area and then click in the
large window below. Press "ctrl" and then "v" and the article will be
placed in the window.
If you want to edit the article, do so and then highlight and copy it
again. Now every time you post the article in a new newsgroup all you have
to repeat is "ctrl" and "v" and press post.
3) That's it. Each time you do this, all you have to do is type in a
different newsgroup, so that way it posts to 200 DIFFERENT newsgroups, or
more.
You see? Now you just have 199 to go!! (Don't worry, each one takes about
30 seconds, once you get used to it. REMEMBER 200 IS THE MINIMUM. The
more you post the more money you will receive.
AND THAT'S IT!! THEY ARE ONLY STEPS!!!
------------------------------
Date: Sun, 23 Mar 1997 23:51:12 -0600
From: Kevin Atkinson <kevina@clark.net>
Subject: Re: Help with so called Virtual Classes
Message-Id: <859181820.2039@dejanews.com>
In article <5h2tu1$5o7@lyra.csx.cam.ac.uk>,
mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
>
> Kevin Atkinson <kevina@clark.net> wrote:
> >And for some of the functions I need to able to tell if the thingie that
> >was passed in is an true object or a class which includes a virtual class.
>
> Is code like this what you want?
>
> sub thing {
> my $self = shift;
> if (ref $self) {
> print "Called with an object\n"
> } else {
> print "Called with a class name\n"
> }
No, as the "virtual class" will come up as an object.
> >And to make matters worse, because some of the objects take other objects
> >as arguments, I need to be able to tell if that object is an object of x
> >type (including an object created in a virtual class which creates the
> >same type of objects as the original class).
>
> The ref function tells you which class an object is in. But you
> probably don't want to be doing that, for the reasons explained under
> 'empty subclass test' in perltoot. Usually, if you want to take
> different actions for different classes, you put the action in a
> method. Then the normal method lookup automatically chooses the
> correct action for each object. And you can use inheritance to
> provide a default action.
That not what I need. An example:
package Math::Fraction
sub add {
$frac1 = shift;
$frac2 = shift;
...
}
now when I call it with a method (or using overloads) $frac1 is garentied
to be an object of Math::Fraction but $frac2 is not. I need to be able
to tell what $frac2 is, and simply testing if it is a reference will not
due as $frac2 could be something like Math::BigInt or Math::BigFloat for
example.
>
> The 'isa' and 'can' methods described in perlobj may also be useful.
I will look those up.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 24 Mar 1997 04:41:46 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How can I find the current working directory?
Message-Id: <5h50ma$4b7$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
webmaster@surewould.com writes:
:How in Perl can I determine the name of the current working directory?
:I've tried getting sneaky (but not too sneaky) with telldir() and
:system("cd .") but none of this is quite right. Is there something
:straightforward I'm missing?
The normal way is:
chomp($cwd = `pwd`);
If you're into PC-speak, there's a module you can use instead.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
As Zeus said to Narcissus, "Watch yourself."
------------------------------
Date: Sun, 23 Mar 1997 21:38:43 -0600
From: Paul Flynn <pmflynn@ix.netcom.com>
Subject: Re: Is CGI a part of or similiar to Perl?
Message-Id: <3335F743.59C1@ix.netcom.com>
CGI & PERL are different animals. CGI is a standard method by which web
browsers and web servers can interact. Basically, CGI is a defined set
of environmental variables that can be accessed by your back-end server
script/program/whathaveyou. PERL scripts are frequently used for
interpreting, parsing--which is separating name/value pairs into the
appropriate parts, etc. PERL just happens to be very good at handling
CGI variables. CGI-capable scripts can be written in almost any
language, though. DOS batch files, Java, Visual Basic, Unix shells,
Lisp, Basic, Pascal--choose your poison.
As with everything else in life, there's more to it than this, but
this'll getcha your answer.
Regards,
Paul
ccrox39754@aol.com wrote:
>
> I've seen numerous references in this newsgroup to cgi. Is CGI a part of perl or are we talking about two different things here? I realize this may be a stupid question, but I hope maybe someone can explain it.
>
> Thanks,
>
> Carlos Croxton
------------------------------
Date: 24 Mar 1997 13:10:10 GMT
From: bjepson@bjepson.ids.net (Brian Jepson)
Subject: Re: Makefile.PL in Win95...where/what should I use for make(.exe)?
Message-Id: <slrn5jcdmk.5l.bjepson@bjepson.ids.net>
In article <333a757a.13032720@nntp.a001.sprintmail.com>, Lord Vorp wrote:
>So I've decided that perl is kewl and I wanna learn/use/practice w/ it
>on my Win95 box. And I've seen that CPAN has most of the modules I
>would need to implement my projects already available. However, I am
>SOOOOOO clueless as to how to use a Makefile.PL under Win95 that I
>have decided to post.
>
This is a very keen observation; CPAN has lots of nice stuff, a one-stop
place for Perl programmers. The Makefile.PL is used by MakeMaker,
which does not run on the ActiveWare port of Perl. This is probably not
so much the fault of the ActiveWare porters so much as the fact that
Windows 95 and Windows NT do not have the same rich store of development
tools as Unix. MakeMaker depends (minimally) on a working make, and
most likely also won't be happy without a shell and lots of the standard
fileutils. I wish this weren't the case, since I use Win32 quite a bit.
Also, some modules, like CGI.pm can be installed by hand; I believe they
come with instructions to this effect. CGI.pm can be installed into the LIB
directory under your Perl for Win32 installation. However, you should
examine the docs, since I think there's some other steps you must take.
I'm sure there are many modules that will install this way, but anything
with a C extension will certainly not install without porting.
Hopefully, this won't be the case for long, as some employees of Cygnus
Support have been working on a port of the GNU toolchain to Windows NT and
95. They are pretty far along, and you can find out more info on:
http://www.cygnus.com/misc/gnu-win32
When this is done, you should be able to build Perl and any extension
under Win32.
Instead of waiting for this project to stabilize, which could take some
time (especially because it's so ambitious), remember that any computer
capable of running Win95 will run Linux even more efficiently. Even if
you're low on disk space, you can cram a working development installation
into about 120 megs or less. If you just want to experiment and don't want
to repartition your drive, you can simply perform a UMSDOS installation,
which will install Linux in a pseudo-Unix filesystem under a VFAT/FAT
directory, such as C:\LINUX.
Hope this helps,
--
Brian Jepson * (bjepson@ids.net) * http://www.ids.net/~bjepson
Int(ra|er)net Database Developer, Author, Crypto-Fluxologist
Non-Prophet Arts Technology Flux: http://www.ids.net/~as220
WWW/Database/NT,Java/Database: http://www.ids.net/~bjepson/books
------------------------------
Date: 23 Mar 1997 21:26:35 -0800
From: dhawk@shell3.ba.best.com (David Hawkins)
Subject: Module or script of data checking routines?
Message-Id: <5h53ab$pt2@shell3.ba.best.com>
I'm handling incoming data and different lines have to be checked in
different ways: some have to have a certain number of digits on the
line, others can't have more than a certain number of letters, etc.
I was wondering if there was a module or file of subroutines available
that had routines where I could pass the data to &checkdigits with
the range of allowable digits, and other routines with similiar
functions? I looked through the modules on CPAN but didn't see
what I was looking for.
Thanks.
later, david
--
David Hawkins dhawk@best.com http://www.river.org/~dhawk
There seems no plan because it's all plan. There seems no center
because it's all center. -- C. S. Lewis
------------------------------
Date: Mon, 24 Mar 1997 12:25:37 GMT
From: donovan@zaak.nl (Donovan Janus)
Subject: Re: ODBC package problem
Message-Id: <333672af.5170710@news.xs4all.nl>
Thanks for all your help
The problem has been solved now :-)
------------------------------
Date: 24 Mar 1997 11:10:01 +0000
From: Olivier Dehon <dehon_olivier@jpmorgan.com>
Subject: Re: printf...
Message-Id: <njzd8sp7dh2.fsf@jpmorgan.com>
"Casey Lee" <cplee@thegrid.net> writes:
>
> Hello,
>
> I am writting a script that will print statements
> for our clients. The thing is that I need to
> print on two halfs of the statement:
>
> -------------------------------------------------------------------------
> | | |
> | Some stuff here | Some more stuff here |
> | | |
> | More stuff here | |
> | | And more here |
> | | |
> -------------------------------------------------------------------------
>
> The thing is that all field need to be variable between
> 0 and (size of page)/2. Is there a way I can use
> printf and write a subroutine so I could say like
>
> &printLeft("Some Stuff here");
> &printRight("Some more stuff here");
> etc...
>
> and it will always start printing the right column at
> the right spot no matter how much text is in the left
> column? assuming left column is < (size of page)/2.
>
You should consider reading the perlform manpage. It describes how to
use formats. Using sprintf() in conjunction with write() should do
what you need.
Hope this helps.
Olivier Dehon
------------------------------
Date: 23 Mar 1997 17:08:58 GMT
From: jfriedl@tubby.nff.ncl.omron.co.jp (Jeffrey)
Subject: Re: regex in perl4
Message-Id: <JFRIEDL.97Mar24020858@tubby.nff.ncl.omron.co.jp>
Eli the Bearded <usenet-tag@qz.little-neck.ny.us> wrote:
|> >I want to extract the second field (the one conaining Ys):
|>..
|> >XXX:YYYY:Z:WW:Q
|>..
|> >And I'm stuck. In perl5, I would do
|> >/^.*?:(.*?):.*$/
|> >but what about perl4 where non-greedy modifiers don't exist.
|>
|> If you don't want :'s matched in some part, don't ask for them.
Hear-hear!
|> /^[^:]*:([^:]*):.*$/
Exactly.
|> Friedl could probably tell you which is more effecient, I don't care much
But if it was your problem and in a time-critical situation, perhaps you'd
like to be able to have some idea about which is which? Of course,
benchmarking with your own data is The Way To Go, but FWIW, I'd bet
that the [^:]: method will be substantially faster than the .*?: method,
although it won't matter much unless it's the bulk of a big loop.
Friedl
----------------------------------------------------------------------------
Jeffrey Friedl <jfriedl@ora.com>
See my Jap<->Eng dictionary at http://www.wg.omron.co.jp/cgi-bin/j-e
O'Reilly's Regular Expression book: http://enterprise.ic.gc.ca/~jfriedl/regex/
------------------------------
Date: Mon, 24 Mar 1997 07:58:08 GMT
From: berhin@fpms.ac.be (Berhin Jean-Francois)
Subject: subdirectories
Message-Id: <333633fc.775462@news.umh.ac.be>
How can i read all files in a directory + sub-directories ?
(RECURSIVE)
Thank's,
Jef.
------------------------------
Date: Mon, 24 Mar 1997 10:52:44 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: subdirectories
Message-Id: <adelton.859200764@aisa.fi.muni.cz>
berhin@fpms.ac.be (Berhin Jean-Francois) writes:
> How can i read all files in a directory + sub-directories ?
> (RECURSIVE)
Use File::Find.
Hope this helps.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: 24 Mar 1997 10:33:54 +0100
From: Tom Grydeland <tom@nospam.eiscat.no>
Subject: Re: text to HTML
Message-Id: <trohc9my65.fsf@palver.i-have-a-misconfigured-system-so-shoot-me>
ebohlman@netcom.com (Eric Bohlman) writes:
> Lewis Taylor (lewis@nexusint.com) wrote:
> : I want to replace all instances of double carriage return (\n\n)
> : with a paragraph tag.
How about letting perl find the paragraph boundaries for you?
perl -w00 -e 'print join "<p>", <>'
--
//Tom Grydeland <Tom@nospam.eiscat.no> # delete 'nospam.' for valid address
The case of Randal Schwartz - http://www.lightlink.com/fors/
------------------------------
Date: 24 Mar 1997 08:03:22 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Uninitialized "next" with -w ?
Message-Id: <5h5cga$bks@lyra.csx.cam.ac.uk>
In article <qmqvg5.br4.ln@localhost>, Tad McClellan <tadmc@flash.net> wrote:
>
>Why it gets confused about the line number, I don't know.
When I try it, it correctly reports the error on line 5, on all versions
of perl from 5.002 to the present. So I suspect he is running some
very old version of Perl.
Mike Guy
------------------------------
Date: 24 Mar 1997 11:18:32 +0100
From: Tom Grydeland <tom@nospam.eiscat.no>
Subject: Re: What's a good Perl book?
Message-Id: <trlo7dmw3r.fsf@palver.i-have-a-misconfigured-system-so-shoot-me>
I guess some of my headers are bogus. I apologize up front, and I
don't really know what do do about it. Sorry.
Tom Christiansen <tchrist@mox.perl.com> writes:
> In comp.lang.perl.misc,
> "Aaron, Penny, Jaymee Minner" <badsmrfs@stratos.net> writes:
> :When I was particularly frustrated at not being able to find
> :something,
> Why don't you tell us what you had trouble finding/learning
> so that we can address these in a future reprint?
I might have mentioned this before, but I'll dare it again:
Finding any reference to the ... operator in the book is close to
hopeless. I had to grep for \.\.\. in the manuals before finding it
in the book. Also, the ... operator is absent from all operator
tables, precedence tables, index etc. I almost thought I had dreamed it
(I too dream in perl sometimes) before it finally appeared in that
grep.
> Tom Christiansen tchrist@jhereg.perl.com
--
//Tom Grydeland <Tom@nospam.eiscat.no> # delete 'nospam.' for valid address
The case of Randal Schwartz - http://www.lightlink.com/fors/
------------------------------
Date: Mon, 24 Mar 1997 07:17:01 GMT
From: augie@cdc3.cdc.net
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <333629d0.1561877@news.cdc.net>
>
>Novell treated Unix with same reverance as WordPerfect alright
>Noorda's sucksessor Frankenstein sold Unix and UnixWare to Sun
>Even still the Unix - Sun deal was done bout a year before the
>WP - Corel deal.
>
nope it went to SCO.
------------------------------
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 167
*************************************