[9140] in Perl-Users-Digest
Perl-Users Digest, Issue: 2758 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 29 08:12:54 1998
Date: Fri, 29 May 98 05:00:54 -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 Fri, 29 May 1998 Volume: 8 Number: 2758
Today's topics:
Re: "ref($proto) || $proto" considered harmful (was Re: <quednauf@nortel.co.uk>
Re: [Q] Platform independant way of writing hash to dis <tchrist@mox.perl.com>
Re: [Q] Platform independant way of writing hash to dis (Greg Lindahl)
Re: Advanced Perl Programming Book (Paddy Spencer)
Re: Certified Webmasters (/\oo/\ the original)
Re: Clearly define "free software" <dpw@doc.ic.ac.uk>
Re: cron job via perl ?? <david@solbors.no>
deleting from a file in perl, and rewriting at the same andrew_broadley@my-dejanews.com
Re: deleting from a file in perl, and rewriting at the <rootbeer@teleport.com>
Re: Deleting Variables <qdtcall@esb.ericsson.se>
Re: GPL documentation == unspeakable evil jimbo@soundiamges.co.uk
Re: hash keys order and AIX large programs <blacroix@soleil.biomerieux.fr>
Re: How can I get the system memory size of my system(L <tom@jellydonut.com>
Re: How do I pass multiple parameters to a cgi script f <rootbeer@teleport.com>
Re: How do I pass multiple parameters to a cgi script f (Eliot)
Re: How do I pass multiple parameters to a cgi script f <quednauf@nortel.co.uk>
Leap Year Script... <straderb@mindspring.net>
Re: Leap Year Script... <Dave.Cross@gb.swissbank.com>
Re: new to OO Perl <dk@tundra.winternet.com>
Pass filehandler to WIN32 process <michaelk@sapiens.com>
Perl 5.004 and Make Question <bitteker@acmenet.net>
Perl DBI and MySQL <dippitydog@hotspot.com>
Perl OO - proper inheritance needed <quednauf@nortel.co.uk>
Re: RegEx for breaking up HTML <quednauf@nortel.co.uk>
Re: Special Variable (again) <lance@nospam.net-school.com>
Re: Two output messages from script <qdtcall@esb.ericsson.se>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 29 May 1998 09:37:30 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: "ref($proto) || $proto" considered harmful (was Re: OO - explicit package name required)
Message-Id: <356E73CA.4F3AE39E@nortel.co.uk>
Tom Christiansen wrote:
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc,
> Zenin <zenin@bawdycaste.org> writes:
> : Err, huh? Why would this ever be a problem? Under what
> : conditions? At least to me, it makes perfect sense
> : that:
> : $anotherLego = $lego->new();
> :
>
> Of course it does. Many people, including you, me, and mjd,
> have all come up with this on their own. It is elegant and clean.
> Randal's background is showing. Don't be too rough on him -- unless
> he tells you you're wrong. :-)
I dunno - it seems most of the fun happens while I am sleeping ;) So what
now? Shall I go for the perltoot way, because Randall is not my generation,
or should I follow one of the Perl gurus? Well, if something (oopps) someone
could tell me, why
sub new {
my $proto= shift;
my $class = ref($proto) || $proto;
my $self = {};
$self->{TITLE} = undef;
$self->{TEXT} = undef;
bless($self, $class);
return $self;
}
is considered harmful, I might as well carry on with it, as one day I will
probably kiss my own b..om because I will be able to do other funky things
with the constructor...
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: 29 May 1998 05:13:40 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: [Q] Platform independant way of writing hash to disk?
Message-Id: <6klg64$b0c$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, lindahl@pbm.com (Greg Lindahl) writes:
:Neither the manpage nor Programming Perl v2 chapter 7 says that,
Wrong.
Here's a partial table of features the different packages offer:
odbm ndbm sdbm gdbm bsd-db
---- ---- ---- ---- ------
Linkage comes w/ perl yes yes yes yes yes
Src comes w/ perl no no yes no no
Comes w/ many unix os yes yes[0] no no no
Builds ok on !unix ? ? yes yes ?
Code Size ? ? small big big
Database Size ? ? small big? ok[1]
Speed ? ? slow ok fast
FTPable no no yes yes yes
Easy to build N/A N/A yes yes ok[2]
Size limits 1k 4k 1k[3] none none
* Byte-order independent no no no no yes
Licensing restrictions ? ? no yes no
--tom
--
Churchill's Commentary on Man: Man will occasionally stumble over the
truth, but most of the time he will pick himself up and continue on.
------------------------------
Date: 29 May 1998 04:20:17 GMT
From: lindahl@pbm.com (Greg Lindahl)
Subject: Re: [Q] Platform independant way of writing hash to disk?
Message-Id: <6kld21$pig@news3.newsguy.com>
lindahl@pbm.com (Greg Lindahl) writes:
> Neither the manpage nor Programming Perl v2 chapter 7 says that, but I
> read the source, and it's true. Golly gee. I know gdbm gets this wrong,
> which is one of the reasons it got abandoned...
Now I have to eat those words, page 380 has a nice chart comparing dbm
implementations, and notes that bsd-db is the only one which is
byte-order independent. So it's mostly cosmetic that it isn't
mentioned anywhere in the DB_File section.
But I'll stand by my claim that I was thinking FORTRAN.
-- g
------------------------------
Date: Fri, 29 May 1998 10:31:31 GMT
From: paddy.spencer@parallax.co.uk (Paddy Spencer)
Subject: Re: Advanced Perl Programming Book
Message-Id: <896437891.626588@red.parallax.co.uk>
Kello 28 May 1998 14:26:44 GMT, Tom Christiansen <tchrist@mox.perl.com>
kirjoittanut:
: In comp.lang.perl.misc,
: "Christopher R. Redinger" <redinger@usm.maine.edu> writes:
: :Advanced Perl Programming by O'Reilly?? We've been calling it the "Puma
: :Book." But, I'm not too sure about the accuracy of that one. Any ideas?
: It's actually a black leopard, and we all call it the ``Panther Book''.
Can we call it the "Bagheera" instead?
--
Paddy Spencer
Parallax Solutions Ltd (http://www.parallax.co.uk/)
------------------------------
Date: Fri, 29 May 1998 07:04:39 GMT
From: WarezSpider@Warez.web/\oo/\ (/\oo/\ the original)
Subject: Re: Certified Webmasters
Message-Id: <356e5fa9.47685890@news.sgi.net>
Actually the School i went to just announced a certification program
for webmasters. The University of Pittsburgh is begining the program
this fall. I just got their Literature on it today and spoke with
them about it. You can call 412-281-7488 for more information.
The Dean there is Louise and she seemed pretty nice, if it matters!
They have both a Web Author Certificate and a Web Programmer
Certificate.
If you call them tell The Web Spinners Guild sent you.
http://guild.2webspinners.com
peace
On Fri, 29 May 1998 00:50:31 GMT, ptompkins@iname.com (Pat Tompkins)
wrote:
>I am not sure if this is the correct venue to ask this question, but I
>am not sure if there is a correct venue for any question...
>
>That blathering aside. My boss just came back from a convention and he
>was told about an association which is supposed to "certify" web page
>designers. He said that if a "certified webmaster", program existed
>for the internet, the company would pay for this certification and he
>could begin to request a for my pay raise. So you can see my interest
>in getting this project moving.
>
>If a certification process exists, I believe it would be good for all.
>No more fly-by-night web site companies popping up out of no where,
>with inexperienced highschool grads working for minimum wage. And I
>think it would lend an air of professionalism to this otherwise
>understood occupation.
>
>Finally, an end to the blathering...
>
>Thanks in advance for your indulgence.
>
>
>
>/***************************
>Tompkins ptompkins@iname.com
>***************************/
------------------------------
Date: 28 May 1998 15:23:37 +0000
From: David Wragg <dpw@doc.ic.ac.uk>
Subject: Re: Clearly define "free software"
Message-Id: <jasoluju6e.fsf@gatsby.u-net.com>
pudge@pobox.com (Chris Nandor) writes:
> A computer program is not a mathematical construct, it USES mathematical
> constructs (usually). I can accept that 2+2=4 is preexistant. I cannot
> accept that perl is, nor can I accept that learning perl was an act of
> rememorization. That forces me to accept a set of beliefs about life,
> death, and existence that I have already examined and rejected.
Firstly, I don't support this notion of "rememorization" - it matters
little to me whether addition is inevitable and so just awaits
discovery, because once I had to learn what addition was and how to
add number in my head. (I know that it has been suggested that some
notion of number is hardwired into the human brain, but even if that
is so I doubt it extends to any form of addition.)
But of the subject of what constitutes a mathematical construct, I
have a problem with Chris Nandor's position, which is where do you
draw the line?
Consider:
- Addition of natural numbers
- Lambda calculus
- Scheme
- Java
- Perl
Which of these are mathematical constructs?
Note that formal mathematical descriptions of semantics of evaluation
for the first four are available. The same could be done for Perl, in
principal.
What about the objects rather than the operations:
- The set of natural numbers
- The set of lambda terms
- The set of legal Scheme programs
- The set of legal Java programs
- The set of legal Perl programs
I realize that there is a intuitive distinction here, but I can't see
how it has any solid foundation.
--
Dave Wragg
------------------------------
Date: Fri, 29 May 1998 11:08:58 +0200
From: David Carter <david@solbors.no>
Subject: Re: cron job via perl ??
Message-Id: <356E7B2A.EA663418@solbors.no>
Hi,
> Is it time for me to look in the "Perl in 21 days" book I bought a while
> ago, or do I need CGI or ....? From what I have seen in www.perl.com I
The former will do. The latest man pages come with a FAQ as well,
which'll
answer 99% of your questions.
> have a feeling that some combination of these two should do the trick
> but not sure where to start.
>
> Shall I try to write a script that starts Netscape and tries to
> replicate Netscape's print instructions after searching for the text I
Nope. Look at the LWP module, which is part of the libwww package.
> need, or a script that directly accesses the net? (I can be the
libwww directly accesses the 'Net.
> Where can I read up / find useful examples on this kind of stuff please.
The man page for LWP::Simple has a trivial example to whet your
appetite:
perl -MLWP::Simple -e 'getprint
"http://www.planetary.net/cgi-bin/webspew?xxn=1&xxh=shake_insult&xxt=Shakespearian+Insult"'
Once you've got your perl program written, just add it to the crontab.
Learn Perl. You won't regret it.
David.
------------------------------
Date: Fri, 29 May 1998 05:25:40 GMT
From: andrew_broadley@my-dejanews.com
Subject: deleting from a file in perl, and rewriting at the same place
Message-Id: <6klgsk$pb2$1@nnrp1.dejanews.com>
i was wondering how to delete from a certian line in a file, then rewrite to
it?
how do you use the delet command, and how do i set a varibale/array as a a
certian line number in a text document (database stored here)
Thnkas
Andrew Broadley
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Fri, 29 May 1998 05:48:53 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: deleting from a file in perl, and rewriting at the same place
Message-Id: <Pine.GSO.3.96.980528224714.3419Q-100000@user2.teleport.com>
On Fri, 29 May 1998 andrew_broadley@my-dejanews.com wrote:
> i was wondering how to delete from a certian line in a file, then
> rewrite to it?
The FAQ tells about this.
> how do you use the delet command,
If you mean the delete function, the perlfunc manpage has an explanation.
> and how do i set a varibale/array as a a
> certian line number in a text document (database stored here)
I think you want the same FAQ entry as before, about working with text
files line-by-line. It's in section five. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 29 May 1998 13:33:37 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Deleting Variables
Message-Id: <isn2c15n1q.fsf@godzilla.kiere.ericsson.se>
barberk3@pilot.msu.edu (Keith) writes:
> # If it is past a $cut_off date, I want to delete the variables, yet I
> # get the error msg "delete argument is not a HASH element..."
I think you need to re-read the bit about delete() in the perlfunc manpage.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
Date: 29 May 1998 12:51:45 +0100
From: jimbo@soundiamges.co.uk
Subject: Re: GPL documentation == unspeakable evil
Message-Id: <ud8cxmh0u.fsf@JIMBOSNTSERVER.i-have-a-misconfigured-system-so-shoot-me>
Russ Allbery <rra@stanford.edu> writes: Judging someone solely on the
> basis of Usenet posts is sometimes a mistake. It definitely is in
> this case.
Well, golly gee, that's all we 'see' of dear old Tom, is it not. He
never calls, nevers writes, never etc... Where the hell else am I
going to 'see' him. I'm using Usenet, after all. His postings are on
Usenet. That is where my knowledge and experience of Tom derive. Use
common sense. Don't tell me judging solely on the basis of Usenet
posts is unfair. That's the same as Tom Cruise moaning when the
tabloids are not going his way. Don't want to be judged, don't
post. Deceptively simple. Christ, I'm bound by it as well. Shall I
take it all back???
Frankly, if Tom has been 'shafted' in the past, I feel most
empathic. However, his rantings and ravings, no matter how well
grounded in logic and based on fact appear the work of an individual
with minimal perspective. Tom's faq's are enourmously helpful. That
copyright rests soley with the author cannot be in dispute. Tom's
faq's do not form the basis of the documentation. A perusal of pod
reveals ONLY the faq's (is that subject to Tom's sole use as well? Was
there a common use of faq or FAQ or FaQ or FAq or fAQ or fAq before
the appearance of the current debate?) contain Tom's copyright
notice. If this is truly a problem for Tom, remove the faq from the
standard distribution. Why are Tom's faq's considered imperitive
anyway. The manual is the only documentation that is required. The faq
is a most decidedly delightful accessory, but that it remains. In the
end, who, except Tom, really cares? The works are his. Remove them
from the distribution. He now makes them available seperately with
whatever copyright and license he feels is appropriate and then it
will be absolutely clear where Tom and HIS faq's stand. From Here to
Eternity. Oh my dearest God, copyright problems, heaven help me.
> > Your trust is more than a single human can guarantee to deserve.
> I'm sorry that you live in such a harsh, cruel, and fundamentally
> hostile world. That's not the world I choose to live in.
Perhaps altering deserve to DELIVER would be accurate. Can you and/or
Tom provide assurances that 'SANE' principles will be exercised should
that situation ever arise? That Tom, as a single human being subject
to the slings and arrows of outrageous fortune, can DELIVER without
fail or misreprensentation or ?whatever? Not an icecube's hope in
hell. Tom is bound by the same mortal blessings and shortcomings as
the rest of us. Tom and his faq's are not the same as perl and it's
documentation. Despite the power of the faq, I'll take the
chance. Remove them, ensure the faq is as protected as Tom desires and
let's put an end to this most monotonous of discussions.
------------------------------
Date: Fri, 29 May 1998 13:22:48 +0200
From: Bruno LACROIX <blacroix@soleil.biomerieux.fr>
Subject: Re: hash keys order and AIX large programs
Message-Id: <356E9A88.AA824AC1@soleil.biomerieux.fr>
Tom Rokicki wrote:
> > Bruno LACROIX <blacroix@soleil.biomerieux.fr> wrote:
> > >First, I've always believed that the order in which a hash's keys are
> > >returned by keys() is identical as long as the hash itself is the same;
>
> As long as it is the same hash, not as long as the hash has the same
> contents. Two different (but otherwise identical) hashes may return
> them in a different order.
>
> Indeed, the assignment
>
> %c = %a
>
> will probably set up the hashes so they return keys in a different order!
> (In Perl 5.004_04, it apparently reverses the order of the bucket chains.)
>
Great, thanks for the information.
For my other problem, I found out that a program has to be linked with the magic
flag -bmaxdata:Number
to be able to break the 256 Mo barrier. Fortunately, the command
> /usr/bin/echo '\0200\0\0\0' | dd of=perl bs=4 count=1 seek=19 conv=notrunc
>
patches efficiently the executable. To whom it may be useful ...
Bruno.
------------------------------
Date: 28 May 1998 21:53:43 -0700
From: Tom Wells <tom@jellydonut.com>
Subject: Re: How can I get the system memory size of my system(Linux)
Message-Id: <m2pvgx1xuw.fsf@jellydonut.com>
Peter A Fein <p-fein@uchicago.edu> writes:
>
> A more general unixism would be to parse the output of the `free` command.
>
the free command is a linux-ism, not a unix-ism. You will not find this
command on freebsd, sunos, solaris, hp-ux, or irix. Just linux.
tom
------------------------------
Date: Fri, 29 May 1998 05:29:05 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How do I pass multiple parameters to a cgi script from the browser?
Message-Id: <Pine.GSO.3.96.980528222434.3419O-100000@user2.teleport.com>
On Fri, 29 May 1998, Eliot wrote:
> Subject: How do I pass multiple parameters to a cgi script from the browser?
>
> I've been hacking at a Perl script for awhile now, and I can't figure
> out how to pass two parameters to the script at once,
You pass parameters to a CGI script in the same way no matter what
language it's written in. The docs, FAQs, and newsgroups about web-related
issues should be able to help you with this. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 29 May 1998 06:00:52 GMT
From: spambait@dragon.erupt.com (Eliot)
Subject: Re: How do I pass multiple parameters to a cgi script from the browser?
Message-Id: <oasb1.567$Nz.587810@news4.atl.bellsouth.net>
I fail to see how this statement helps me when you could have posted an
excerpt from or a URL for a FAQ. If you don't want to help, please
don't waste bandwidth with "Go somewhere else".
In article <Pine.GSO.3.96.980528222434.3419O-100000@user2.teleport.com>,
Tom Phoenix <rootbeer@teleport.com> wrote:
>On Fri, 29 May 1998, Eliot wrote:
>
>> Subject: How do I pass multiple parameters to a cgi script from the browser?
>>
>> I've been hacking at a Perl script for awhile now, and I can't figure
>> out how to pass two parameters to the script at once,
>
>You pass parameters to a CGI script in the same way no matter what
>language it's written in. The docs, FAQs, and newsgroups about web-related
>issues should be able to help you with this. Hope this helps!
>
------------------------------
Date: Fri, 29 May 1998 09:45:05 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: How do I pass multiple parameters to a cgi script from the browser?
Message-Id: <356E7590.F14DD96F@nortel.co.uk>
Eliot wrote:
> I fail to see how this statement helps me when you could have posted an
> excerpt from or a URL for a FAQ. If you don't want to help, please
> don't waste bandwidth with "Go somewhere else".
You are really in no position to complain, but it is Friday, and the weather
starts to get
nice:http://www.sillydomainname.com/cgi-crap/numbscript.pl?philosopher=plato+dictator=castro+impatience=eliot
3 parameters, all with a definite meaning :) Flame me if I am wrong.
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Fri, 29 May 1998 02:10:29 -0400
From: Billy Strader <straderb@mindspring.net>
Subject: Leap Year Script...
Message-Id: <356E5155.F14AADEC@mindspring.net>
OK I am making a script that will subtract one day but I need to account
for leap and stuff here is what I ahve but I continue to get sytax
errors... WHY? if anyone can help me or give me another idea on how to
do this but I gotta include DST it will be greatly appriacted.
#!/usr/perl
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$day = $mday - 1;
$month = $mon +1;
$time = localtime(time);
if ($day eq 0) {
$month = $mon;
If ($month = '4', '6', '9', '11') {
$day = "30";
goto FINISH;
}
elsif ($month = '2') {
If ($year/4 == int($year/4)) {
$day = "29";
goto FINISH;
}
$day = "28";
goto FINISH;
}
$day = "31";
}
FINISH: {
print "Today is $time\n";
print "yday = $yday\n";
print "wday = $wday\n";
print "isdat = $isdst\n";
print "Time is $hour:$min:$sec\n";
print "Date is $month-$mday-$year\n";
}
Sincerley,
Billy Strader
------------------------------
Date: Fri, 29 May 1998 09:22:32 GMT
From: David Cross-cmt <Dave.Cross@gb.swissbank.com>
Subject: Re: Leap Year Script...
Message-Id: <eq0solta0tj.fsf@gb.swissbank.com>
Billy Strader <straderb@mindspring.net> writes:
>
> OK I am making a script that will subtract one day but I need to account
> for leap and stuff here is what I ahve but I continue to get sytax
> errors... WHY? if anyone can help me or give me another idea on how to
> do this but I gotta include DST it will be greatly appriacted.
>
> #!/usr/perl
>
> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
>
> $day = $mday - 1;
> $month = $mon +1;
> $time = localtime(time);
>
> if ($day eq 0) {
> $month = $mon;
> If ($month = '4', '6', '9', '11') {
'If' should be 'if', but even if you correct that, I don't think this
condition is doing wht you think it is.
> $day = "30";
> goto FINISH;
> }
> elsif ($month = '2') {
> If ($year/4 == int($year/4)) {
'If' should be 'if' again. This whole section is probably better
written as:
$day = ($year % 4) ? 28 : 29;
although it still doesn't take account of the century rule for leap
years.
> $day = "29";
> goto FINISH;
> }
> $day = "28";
> goto FINISH;
> }
> $day = "31";
> }
>
> FINISH: {
> print "Today is $time\n";
> print "yday = $yday\n";
> print "wday = $wday\n";
> print "isdat = $isdst\n";
> print "Time is $hour:$min:$sec\n";
> print "Date is $month-$mday-$year\n";
> }
Having calculated $day. you then don't use it in the output. I still
think it would be easier to let localtime to calculate yesterday's date
for you by calling it as:
localtime(time - 60 * 60 * 24) # 60*60*24 is seconds in 24 hrs
but as Dean Inada pointed out in a posting that I've yet to see here, this
may cause problems in the two hours a year when you're changing to and from
DST.
A more robust solution would probably be to install the Date::Manip
module from CPAN.
hth,
Dave...
--
If I wasn't so busy writing status reports,
my status report might just become a progress report.
Dave.Cross@gb.swissbank.com
------------------------------
Date: 29 May 1998 11:18:42 GMT
From: Dave Kenny <dk@tundra.winternet.com>
Subject: Re: new to OO Perl
Message-Id: <6km5ii$7j4$1@blackice.winternet.com>
John Chambers <jc@ral1.zko.dec.com> wrote:
<snip>
: (Note that I'm not casting aspersions on perl's hash tables.
: I use them a lot, and I like to use them as an example of how
: perl includes some powerful ideas in a very simple fashion.
: But I also find them useful as an example of something that
: can be easily misused by programmers who don't appreciate the
: complexity and time cost hidden behind that simple-looking
: $x{$y} indexing notation.)
But for what I do in Perl, efficiency is often of little importance. What
is important is simplicity and easiness so _my_ memory and "cpu"
resources are not heavily taxed. I use hashes a lot because they are
often a "no brainer" solution to something I'd otherwise have to write
an order of magnitude more code...
What's a 100 to 1 code slowdown on a system running Windows etc? For
a normal program it'd be barely noticeable :-)
------------------------------
Date: Fri, 29 May 1998 11:31:36 +0300
From: Michael <michaelk@sapiens.com>
Subject: Pass filehandler to WIN32 process
Message-Id: <356E7268.75A71B87@sapiens.com>
I am looking for way pass to WIN32 process (of course, perl script) previosly created SOCKET or FILEHANDLER.
------------------------------
Date: Fri, 29 May 1998 01:37:26 -0400
From: Brian Bitteker <bitteker@acmenet.net>
Subject: Perl 5.004 and Make Question
Message-Id: <356E4996.B909DADB@acmenet.net>
Here is my situation.
Today I finally upgraded from an older version of PERL to 5.004 for
Win32, (the Gurusamy Sarathy's binary version of Perl and not the
ActiveState's build of Perl for Win32). I also needed to upgrade
various modules from what is available in the Perl 5.004 (libwww and a
few others). Here is the problem (and I am probable totally ignorant
for saying so). When installing any module, run the MakeFile.pl script,
then run MAKE... Well, In 5.004 there is no MAKE executable, so how do
you install modules? What am I missing?
If anyone can point me in the right direction I would appreciate it.
Thanks
B Bitteker.
------------------------------
Date: Fri, 29 May 1998 00:30:04 -0500
From: "dippity" <dippitydog@hotspot.com>
Subject: Perl DBI and MySQL
Message-Id: <6klh1h$pae$1@news.anet-stl.com>
I've just installed MySQL on my computer (Red Hat 5.0).
The following script fails with must import package name for $username, and
the same error for $dbh.
What am I doing wrong???
#!/usr/bin/perl
use DBI;
use strict; my $database = "contacts";
my $data_source = "DBI:mysql:$database"
my $username = "fty";
my $password = "password";
my $dbh = DBI->connect( $data_source, $username, $password)
or die "Can't connect to $data_source: $dbh->errstr\n";
$dbh->disconnect;
exit(0);
------------------------------
Date: Fri, 29 May 1998 09:52:58 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Perl OO - proper inheritance needed
Message-Id: <356E776A.9DCC003D@nortel.co.uk>
28/5/1998 23:48 - Finding no comfort in my own code
Well, at the danger of risking dead brain cells and legal action
against myself
I'll keep on asking impertinent questions. I managed to get
time::gmtime into my package.
Nice. But somehow I can't inherit the stuff coming from there in
the way perltoot suggests.
Sooo, what I am doing right now is that:
sub new {
my $class = shift; # or my $proto= shift; my $class =
ref($proto) || $proto; (???)
my $self = {};
my $gm = gmtime();
$self->{TITLE} = undef;
$self->{TEXT} = undef;
$self->{WEEKDAY} = (qw(Sun Mon Tues Wednes Thurs Fri Satur
Sun))[ $gm->wday() ]."day";
$self->{YEAR} = $gm->year()+1900;
$self->{MONTH} = $gm->mon()+1,
$self->{DAY} = $gm->mday(),
bless($self, $class);
return $self;
}
Is this a good way of doing it?
I had a few other ideas that I wanted to try out, but
it's getting late :(
Unfortunately I am the type of person who always wants to try out
things, so excuse
if I am missing something obvious...
Well, maybe I am just getting paranoic..so g'night!
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Fri, 29 May 1998 09:41:35 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: RegEx for breaking up HTML
Message-Id: <356E74BE.F2D02C46@nortel.co.uk>
Doran L. Barton wrote:
> I need a RegEx that will return a list of HTML elements and non-HTML
> elements in a stream. For example, a file looks like this:
I think the html::Parse module does this job for you rather nicely! Check
the CPAN, Bartonsan!
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: 29 May 1998 07:21:49 GMT
From: "Lance Hollman" <lance@nospam.net-school.com>
Subject: Re: Special Variable (again)
Message-Id: <01bd8ad2$303fe160$67f486cd@myname>
bthak@bascom.com wrote in article <6kkecg$2qh$1@nnrp1.dejanews.com>...
> Okay let me try to clarify what i need. (Hope this is clearer)
>
> foreach $index ($rangeStart..$rangeFin) {
> $i = $index;
> if ($ip1[$i] =~ /^\d+$/ && $ip2[$i] =~ /^\d+$/ && $ip3[$i] =~ /^\d+$/
&&
> $ip4[$i] =~ /^\d+$/) {
[snip]
instead of lumping all the matches into one if statement, you could cycle
through each array individually and run your tests:
@ip1 = ('1','2','3','4');
@ip2 = ('1','e','3','4');
@ip3 = ('1','2','3','4');
@ip4 = ('1','2','e','4');
foreach $i (0..3) {
foreach $ipnum (1..4) {
$iparr = "ip" . "$ipnum";
unless ( ($$iparr[$i] =~ /^\d+$/) && ($$iparr[$i] >=0) &&
($$iparr[$i] <= 255) ) {
print "failed on ip", $ipnum, "[$i] = $$iparr[$i]\n";
}
}
}
Lance
------------------------------
Date: 29 May 1998 10:03:37 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Two output messages from script
Message-Id: <iszpg15wrq.fsf@godzilla.kiere.ericsson.se>
Tasha van Es <vanes@raptor.com> writes:
> What does perl see that I don't?
Something in the parts of the script you didn't show us, probably.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
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 2758
**************************************