[10213] in Perl-Users-Digest
Perl-Users Digest, Issue: 3806 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 23 19:08:35 1998
Date: Wed, 23 Sep 98 16:00:19 -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 Wed, 23 Sep 1998 Volume: 8 Number: 3806
Today's topics:
Re: 1st Sunday of each Month (Steffen Beyer)
Re: Accessing DBF files (dbase III+) (Honza Pazdziora)
Can Perl be used on a WANG VS 12xxx, 16xxx ? birgitt@my-dejanews.com
Re: Concatenating 3 strings (Craig Berry)
exec cgi in apache 1.3.1 ssantini@my-dejanews.com
Re: exec cgi in apache 1.3.1 <jarrowwx@stt3.com>
Re: Need Perl function that always rounds an integer up <ajohnson@gpu.srv.ualberta.ca>
Re: Need Perl function that always rounds an integer up (Craig Berry)
Re: Need Perl function that always rounds an integer up (Larry Rosler)
Re: Perl & Java - differences and uses <ajohnson@gpu.srv.ualberta.ca>
Re: Perl & Java - differences and uses <borg@imaginary.com>
Re: Perl & Java - differences and uses <borg@imaginary.com>
Re: Perl & Java - differences and uses <borg@imaginary.com>
Re: Perl and Oraperl <rzmw30@email.sps.mot.com>
Re: Poll: How Did You Learn Perl? (Mads Toftum)
Re: Poll: How Did You Learn Perl? <ckuskie@cadence.com>
Re: Poll: How Did You Learn Perl? (Honza Pazdziora)
Re: Poll: How Did You Learn Perl? (Tad McClellan)
Re: Poll: How Did You Learn Perl? (Tad McClellan)
Re: printing to a file - variables cause carriage retur <ff@creative.net>
Re: problems with dates being off by 1 day (Craig Berry)
Re: question about variable interpolation in search pat (Tad McClellan)
Re: Rotating an array. (Larry Rosler)
Re: Rotating an array. (Steffen Beyer)
sending email attachments using just perl? (tim pickup)
Windows NT Scripting Resources. <cwashing@ix.netcom.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 23 Sep 1998 19:46:30 GMT
From: sb@engelschall.com (Steffen Beyer)
Subject: Re: 1st Sunday of each Month
Message-Id: <6ubj6m$a3n$2@en1.engelschall.com>
Stafford Hyacinth <hyacinth@bellsouth.net> wrote:
> Anyone has sample code for figuring out the 1st sunday of each month or at
> least give an idea where to begin. Have been going at this for two days and
> still have no code. If I could only do vbscripts on the UNIX platforms.
> Thanks
use Date::Calc qw(:all);
@first_sunday = Nth_Weekday_of_Month_Year($year,$month,7,1);
(The "7" is for "Sunday", the "1" for "first")
"Date::Calc" can be found on CPAN (http://www.perl.com/CPAN/authors/id/STBEY)
or on my web site at http://www.engelschall.com/u/sb/download/.
Hope this helps.
Yours,
--
Steffen Beyer <sb@engelschall.com>
Free Perl and C Software for Download: www.engelschall.com/u/sb/download/
------------------------------
Date: Wed, 23 Sep 1998 22:15:25 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Accessing DBF files (dbase III+)
Message-Id: <slrn70isns.h4e.adelton@aisa.fi.muni.cz>
On Wed, 23 Sep 1998 17:39:50 -0400, Mark Cain <mark@uninetwork.com> wrote:
> Where can I find information regarding accessing dbf files with perl?
>
> The FAQ does not contain the words 'dbf' or 'dbase' and the word
> 'database' usually points to DBM and never to dbf. Likewise, the docs
www.perl.com, link databases, has something to say about dbf's.
> with 5.005_02 built for MSWin32-x86-object do not contain a reference.
>
> If you can not point me to a place for reference, could you answer how
> would I read the header of the file, determine the structure, and get at
> the data?
Use the module XBase (or DBD::XBase for DBI interface), to be get
from any good CPAN mirror.
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: Wed, 23 Sep 1998 22:03:12 GMT
From: birgitt@my-dejanews.com
Subject: Can Perl be used on a WANG VS 12xxx, 16xxx ?
Message-Id: <6ubr70$bu0$1@nnrp1.dejanews.com>
Thanks for pointers. I couldn't find any. B.F.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 23 Sep 1998 22:08:00 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Concatenating 3 strings
Message-Id: <6ubrg0$qmp$3@marina.cinenet.net>
leah_price@ibi.com wrote:
: I would like to concatenate three strings. The first two are variables, the
: third is a text string.
:
: $subject = $a.$b; works.
:
: But when I try to add the text string it doesn't work. Am I doing something
: wrong?
:
: $subject = $a.$b."String";
"Doesn't work" in what sense? What are your inputs ($a and $b), what
output do you expect, and what are you seeing instead?
Note also that the above can be expressed more succinctly as:
$subject = "$a${b}String";
The curly-brackets around b are necessary to prevent the variable from
looking like $bString to the parser.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Wed, 23 Sep 1998 21:47:50 GMT
From: ssantini@my-dejanews.com
Subject: exec cgi in apache 1.3.1
Message-Id: <6ubqa6$b2o$1@nnrp1.dejanews.com>
I have several problems with apache 1.3.1 and the SSI directives.
I wrote in the index.html file the following:
<!--#exec cgi="/cgi-bin/counter.pl"-->
This do nothing!!!
I prove all the solutions describes in other messages posting here (write
include virtual instead of exec cgi, rename counter.pl to counter.cgi, Options
ExecCGI in the cgi directories, file and directory permissions, and others),
but I don't have results.
Please, what can I do?
Thanks...
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 23 Sep 1998 15:29:00 -0700
From: John Arrowwood <jarrowwx@stt3.com>
To: ssantini@my-dejanews.com
Subject: Re: exec cgi in apache 1.3.1
Message-Id: <3609762C.D7A957C9@stt3.com>
ssantini@my-dejanews.com wrote:
>
> I have several problems with apache 1.3.1 and the SSI directives.
> I wrote in the index.html file the following:
>
> <!--#exec cgi="/cgi-bin/counter.pl"-->
>
> This do nothing!!!
Try renaming index.html to index.shtml (preferred) or
enable server-parsed on regular .html files. If you
choose the latter approach, you might want to only
over-ride it for that directory, not all, by using
a .htaccess file. Of course, if the directory in
question is the SERVER_ROOT, it's the same thing
as making it global (roughly).
------------------------------
Date: Wed, 23 Sep 1998 16:54:15 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Need Perl function that always rounds an integer up. i.e. 283.34 = 284.
Message-Id: <36096E07.3FB8DD6@gpu.srv.ualberta.ca>
Vince wrote:
>
> I'm looking for a Perl function that works like the floor(x) function in
> C. If you aren't
> familiar with C, floor(x) acts like floor(283.34) would equal 284. All
> floor(x) does is
> always round up x.
perhaps you are looking for the content provided in the
perl FAQ's, particularly section 4:
perlfaq4.pod:=head2 Does perl have a round function? What about ceil() and
floor()? Trig functions?
regards
andrew
------------------------------
Date: 23 Sep 1998 22:00:27 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Need Perl function that always rounds an integer up. i.e. 283.34 = 284.
Message-Id: <6ubr1r$qmp$1@marina.cinenet.net>
Vince (vmp12@csufresno.edu) wrote:
: I'm looking for a Perl function that works like the floor(x) function
: in C.
perldoc perlfaq4, see "Does perl have a round function? What about ceil()
and floor()? Trig functions?"
The online doc is your friend.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Wed, 23 Sep 1998 15:11:14 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Need Perl function that always rounds an integer up. i.e. 283.34 = 284.
Message-Id: <MPG.107311d8e61101f09897b6@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <36093FC6.C369CA8D@csufresno.edu> on Wed, 23 Sep 1998 11:36:55
-0700, Vince <vmp12@csufresno.edu> says...
> I'm looking for a Perl function that works like the floor(x) function in
> C.
...
> Does anyone know if there is a function in Perl that does this and if
> not is there a possible work around?
perlfaq4: "Does perl have a round function? What about ceil() and
floor()? Trig functions?"
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 23 Sep 1998 16:50:54 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Perl & Java - differences and uses
Message-Id: <36096D3E.322D5022@gpu.srv.ualberta.ca>
George Reese wrote:
!
[snip]
! : yes, but showing that the process of software development is
! : repeatable does not show that it repeatedly produces *quality*
! : software --- which was the motivating condition in premise 1.
!
! While, at this point, it does not prove my point, you will concede
! that "OO software engineering is reasonably repeatable"?
not necessarily any more so than a good structured programming
method --- remember, a process may be algorithmic and repeatable
without it being necessary that it be 'for' producing some "thing".
I do not think OO has any particular affinity for repeatedly producing
quality results --- even if the process itself is somewhat repeatable.
(see *[1] Dennet[1995], 55-56 & 308 ... the algorithmic nature you
ascribe to OO is more similar to his discussions here, where the
algorithm is guaranteed to 'do' what it 'does' but perhaps only
'tends' to produce something interesting ... or in your case,
something of quality or reusability ... you can build a stronger
case for a weaker form of 'OO is better', and it will fall more
closely to the OO party line, though you may be able to provide a
new slant on it)
! You are correct. I am missing a link in those arguments.
!...
! So the weakpoint of my argument seems to be getting from 'OO is a
! the most repeatable software engineering process' to 'the OO process
! results in quality code'.
!
! Basically, all I need to do is show that you can produce quality code
! since ostensibly people will follow the repeatable paths that produce
! quality code and not the ones that will produce failure.
that's not going to cut it: because one 'can' produce quality code
using OO does not mean that it was any aspect of OO that caused the
production of quality code --- quality code can be generated from
a stuctured non-OO approach, and that approach may be as repeatable
as any OO approach... but it does not provide any 'strong' assurances
of repeatedly producing quality code in either case.
I have nothing against OO methodology, but I do not think it (or any
other methodology, repeatable or not) can provide the strong
guarantees of producing quality code given a problem to solve, that you
seem to be arguing for.(see comments above)
! (In fact, the anti-patterns book is about repeatable OO design
! patterns that will guarantee failure)
!
!
! OO design patterns are proven quality components.
are you saying that only OO has design patterns?
! OO software is made up at least in part of OO design patterns.
!
! The greater a percentage of an OO system is made up of OO design
! patterns and other kinds of proven OO components (i.e. business
! objects), the more likely a piece of software has of being a quality
! piece of software.
!
! As time goes by, more and more problems will have proven patterns (or
! other kinds of reusable components) to back them up.
this sounds more like an argument for reusability of designed
components rather than an argument for the repeatability of the
design and production method.(again, see above)
! Because OO can predict how proven components will interact given their
public
! interfaces, OO is capable of resulting in quality code.
!
! Now the issue is, is OO guaranteed to produce quality software given
! no design patterns or a famine of them? The answer is clearly no.
agreed ...
! I am of course begging the question of whether there are sufficient
! design patterns and other components to get this far. Suffice it to
! say I think that plays into another area where OO is weak and people
! should question its use. If someone wants to get into it, I will, but
! that is not really important to the topic at hand.
but it still sounds like your argument on repeatability 'depends' on
sufficient reusable proven components ... it will not address OO's
ability to address 'new' problems (where 'new' is not necessarily
something new under the sun, just something not yet developed into
a 'design pattern' which can be reused).
Thus far, I am unconvinced by your arguments that OO offers any more
assurances of *quality* code production than following a good, sound
structural approach with a procedural language --- I am not saying OO
has not given us anything, or that it is worthless, or that some
problems might not be more ammenable to OO design --- just that it
does not appear to be by fiat "the best method for most software
production".
------
following content cut and shifted from earlier:
! Sine you seem to have read Dennett, I am going to talk in Dennett
! terms on this because it is easier...
!
! Basically, that they produce identical code is irrelevant. What
! matters is the results at the level at which explanation occurs. In
! other words, take for example the following two addition methods:
!
! public int add(int a, int b) {
! return (a + b);
! }
!
! public int add(int a, int b) {
! a +=b;
! return a;
! }
!
! These two methods are written differently. Nevertheless, those
! methods have the same signature, same function, and same performance.
! At the level at which we explain the system--the level at which we
! care about the results, they are identically written.
ok, ... but if we shift our level of analysis up a step or two, to
the stage at which the classes/objects and interfaces are specified,
given a problem there is also more than one way to classify the
system ... freedom still exists ... and I still consider these stages
to be aspects of programming which exhibit many avenues of freedom
regardless of the language or methodology used. I think you must
mean something entirely different when stating that 'freedom has no
place in programming'.
------
* this book cited because it is where George drew his earlier
description of algorithms and their properties: Dennet is a
philosopher focusing on questions of conciousness and cognitive
studies:
[1] Daniel C Dennet (1995) Darwins Dangerous Idea. Simon &
Schuster:New York.
regards
andrew
------------------------------
Date: Wed, 23 Sep 1998 22:33:40 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <8HeO1.1641$Ge.5442150@ptah.visi.com>
In comp.lang.java.programmer Andrew Johnson <ajohnson@gpu.srv.ualberta.ca> wrote:
: I do not think OO has any particular affinity for repeatedly producing
: quality results --- even if the process itself is somewhat repeatable.
: (see *[1] Dennet[1995], 55-56 & 308 ... the algorithmic nature you
: ascribe to OO is more similar to his discussions here, where the
: algorithm is guaranteed to 'do' what it 'does' but perhaps only
: 'tends' to produce something interesting ... or in your case,
: something of quality or reusability ... you can build a stronger
: case for a weaker form of 'OO is better', and it will fall more
: closely to the OO party line, though you may be able to provide a
: new slant on it)
Yes, I find his discussions of what it is to be an algorithm to be
appealing. And I am not saying anything radical in this thread--I am
towing the party line. I think part of the problem has been the
willful misrepresentation of my views which I have spent way too much
time fighting.
: ! You are correct. I am missing a link in those arguments.
: !...
: ! So the weakpoint of my argument seems to be getting from 'OO is a
: ! the most repeatable software engineering process' to 'the OO process
: ! results in quality code'.
: !
: ! Basically, all I need to do is show that you can produce quality code
: ! since ostensibly people will follow the repeatable paths that produce
: ! quality code and not the ones that will produce failure.
: that's not going to cut it: because one 'can' produce quality code
: using OO does not mean that it was any aspect of OO that caused the
: production of quality code --- quality code can be generated from
: a stuctured non-OO approach, and that approach may be as repeatable
: as any OO approach... but it does not provide any 'strong' assurances
: of repeatedly producing quality code in either case.
I disagree completely. As I discussed later in the post, OO is better
suited to repeatedly building quality software because it comes from
components which have already been proven. And yes, that does
substantially change the nature of my original argument.
: ! (In fact, the anti-patterns book is about repeatable OO design
: ! patterns that will guarantee failure)
: !
: !
: ! OO design patterns are proven quality components.
: are you saying that only OO has design patterns?
No, but I am implying that something about OO design patterns make them
better suited to encapsulationin reusable components. In fact, I
intentionally qualified 'design patterns' with 'OO' so as to avoid
being interpreted as saying anything at all about non-OO design
patterns.
: ! OO software is made up at least in part of OO design patterns.
: !
: ! The greater a percentage of an OO system is made up of OO design
: ! patterns and other kinds of proven OO components (i.e. business
: ! objects), the more likely a piece of software has of being a quality
: ! piece of software.
: !
: ! As time goes by, more and more problems will have proven patterns (or
: ! other kinds of reusable components) to back them up.
: this sounds more like an argument for reusability of designed
: components rather than an argument for the repeatability of the
: design and production method.(again, see above)
It is a combination of the two. Given:
* OO is a paradigm based on the use and reuse of designed components.
* Given proven behaviour of the parts, a process for putting together
the parts that is repeatable is going to have an advantage in
predictably producing a quality whole.
- Thus OO has an advantage over other paradigms.
: ! Because OO can predict how proven components will interact given their
: public
: ! interfaces, OO is capable of resulting in quality code.
: !
: ! Now the issue is, is OO guaranteed to produce quality software given
: ! no design patterns or a famine of them? The answer is clearly no.
: agreed ...
:
: ! I am of course begging the question of whether there are sufficient
: ! design patterns and other components to get this far. Suffice it to
: ! say I think that plays into another area where OO is weak and people
: ! should question its use. If someone wants to get into it, I will, but
: ! that is not really important to the topic at hand.
:
: but it still sounds like your argument on repeatability 'depends' on
: sufficient reusable proven components ... it will not address OO's
: ability to address 'new' problems (where 'new' is not necessarily
: something new under the sun, just something not yet developed into
: a 'design pattern' which can be reused).
: Thus far, I am unconvinced by your arguments that OO offers any more
: assurances of *quality* code production than following a good, sound
: structural approach with a procedural language --- I am not saying OO
: has not given us anything, or that it is worthless, or that some
: problems might not be more ammenable to OO design --- just that it
: does not appear to be by fiat "the best method for most software
: production".
So the problem is whether or not I have shown OO can reliably produce
quality code? From the preceding paragraph, it sounds more like you
should be saying that I have not shown how OO can reliably produce
quality code for 'new situations' defined as you defined them above.
I can agree that I have not shown that, but I disagree that I have not
shown the former.
As far as new situations go, that argument is much more complex. I
would say that the principle of encapsulation at the heart of the OO
paradigm is better suited to the creation of truly reusable design
patterns. I think though that I want to leave that argument for
another day, as this thread has grown old for me given the venom of
other posters. I do appreciate, however, the professionalism of your
responses.
: ------
: following content cut and shifted from earlier:
: ! Sine you seem to have read Dennett, I am going to talk in Dennett
: ! terms on this because it is easier...
: !
: ! Basically, that they produce identical code is irrelevant. What
: ! matters is the results at the level at which explanation occurs. In
: ! other words, take for example the following two addition methods:
: !
: ! public int add(int a, int b) {
: ! return (a + b);
: ! }
: !
: ! public int add(int a, int b) {
: ! a +=b;
: ! return a;
: ! }
: !
: ! These two methods are written differently. Nevertheless, those
: ! methods have the same signature, same function, and same performance.
: ! At the level at which we explain the system--the level at which we
: ! care about the results, they are identically written.
: ok, ... but if we shift our level of analysis up a step or two, to
: the stage at which the classes/objects and interfaces are specified,
: given a problem there is also more than one way to classify the
: system ... freedom still exists ... and I still consider these stages
: to be aspects of programming which exhibit many avenues of freedom
: regardless of the language or methodology used. I think you must
: mean something entirely different when stating that 'freedom has no
: place in programming'.
I guess I do not understand the type of freedom you are speaking of
here. Given a problem, there is more than one way to break it up in
terms of the classes and their public interfaces, however, IMHO, that is not
the realm of the programmer in an OO software engineering process.*
* Practically, speaking, programmers today need to have this knowledge
due to the tremendous labour shortage and the lack of sophistication
still found in most OO development.
--
George Reese (borg@imaginary.com) http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
"Keep Ted Turner and his goddamned Crayolas away from my movie."
-Orson Welles
------------------------------
Date: Wed, 23 Sep 1998 22:35:50 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <aJeO1.1642$Ge.5442150@ptah.visi.com>
In comp.lang.java.programmer Zenin <zenin@bawdycaste.org> wrote:
: George Reese <borg@imaginary.com> wrote:
: : In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
: >snip<
: : : I am particularly gratified that you encourage the use of a language
: : : which *supports* the chosen paradigm, rather than *enforces* it.
: : : By your statement above, Perl is an acceptable choice (perhaps not
: : : the best) when the paradigm is OO.
: :
: : Supports and enforces are the same thing in this context. Perl is a
: : particularly shitty choice of a language in an OO environment.
: And then later in the same post you state:
: >snip<
: : As I stated before, no language can enforce OO along the lines you are
: : speaking of.
: Or more correctly, no language can enforce OO at all (as you
: yourself proved in another post), thus "supports" and "enforces"
: are (as they are in ENGLISH) two very, very different terms.
Goddamn, you are a fucking idiot. Those two are not contradictory
statements and I am tired of playing word games with you and the other
group of clowns who seem so utterly incapable of reading.
--
George Reese (borg@imaginary.com) http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
"Keep Ted Turner and his goddamned Crayolas away from my movie."
-Orson Welles
------------------------------
Date: Wed, 23 Sep 1998 22:39:49 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <VMeO1.1643$Ge.5442150@ptah.visi.com>
In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
: If (hypothetically) Java supported some mechanisms which are, by
: definition, functional in nature, would you advise Java programmers
: not to make use of them, being as how they are not OO features?
: Or, possibly, would you recommend that OO practitioners consider
: a different language, one which doesn't dilute the purity of OO?
: If you have a hard time relating this question to Java per se,
: think of a hypothetical language which is better than Java in
: all OO respects, but with the addition of the aforementioned
: functional features.
If there were one and only one functional feature in the language? I
would advise people not to use the feature. If the language became
polluted with functional constructs, I would advise the abandonment of
the language.
:> Method pointers/closures/functionals etc are not inherently
:> functional.
: I can only assume from this that you don't know Lisp.
I know lisp. Because their appearance in Lisp is purely functional,
why is it that their appearance in another language must also be so?
--
George Reese (borg@imaginary.com) http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
"Keep Ted Turner and his goddamned Crayolas away from my movie."
-Orson Welles
------------------------------
Date: Wed, 23 Sep 1998 16:45:38 -0500
From: "rzmw30" <rzmw30@email.sps.mot.com>
Subject: Re: Perl and Oraperl
Message-Id: <6ubq70$pd0$1@newsgate.sps.mot.com>
Thank you Elaine Ashton! It works fine.
Doug
Elaine -HappyFunBall- Ashton wrote in message
<360915B6.54B03339@bbnplanet.com>...
>rzmw30 wrote:
>
>> I'm somewhat new to perl and am having problems
>> trying to get oraperl to compile and install.
>> I've compiled and installed Perl Version 5.005_2
>> and it works fine.
>
>Oraperl is outdated (I think, at least I haven't used it in a lonnnnggg
>while). Go up to CPAN and get DBI.pm and DBD for Oracle.
>
>e.
>
>"All of us, all of us, all of us trying to save our immortal souls, some
>ways seemingly more round-about and mysterious than others. We're having
>a good time here. But hope all will be revealed soon." R. Carver
------------------------------
Date: Wed, 23 Sep 1998 22:17:23 GMT
From: mt@dev.null (Mads Toftum)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <360a7097.1560806@news.inet.tele.dk>
On Wed, 23 Sep 1998 12:38:04 -0400, John Porter <jdporter@min.net>
wrote:
>. Studying existing code
First: Copy Paste coding is nice ;-)
Second: Trial and error (mostly error, but eventually...)
>. Docs included in the distribution
Third: perldoc is a handy little tool - once you get access to it.
>. Other book (give name)
Fourth: Advanced Perl Programming (okay, I already knew much about
Perl programming, but this book added a few twists)
There's still so much to learn, but only ~25 hours a day to do it in
;-)
vh.
Mads Toftum, (QDPH/JAPH)
---
A computer lets you make more mistakes faster than any other
invention, with the possible exceptions of handguns and Tequilla.
-- Mitch Ratcliffe
------------------------------
Date: Wed, 23 Sep 1998 15:22:58 -0700
From: Colin Kuskie <ckuskie@cadence.com>
To: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <Pine.GSO.3.96.980923152211.6470F-100000@pdxue150.cadence.com>
On 23 Sep 1998, Randal Schwartz wrote:
> >>>>> "Colin" == Colin Kuskie <ckuskie@cadence.com> writes:
>
> Colin> I don't know why Randal
> Colin> left. Nobody beat him up, maybe he's just overwhelmed by the volume.
>
> Define "left". That's not right. :)
>From Kuskie's First Dictionary:
Left: noun
A direction which is generally opposite from right, unless you
have more than two hands.
Left: verb, the past tense of leave.
A remainder: What is left over from the great newbie fiasco?
To leave: Tom Christiansen once left clp.misc because people were
upset that he was trying to get newbies to learn netiquette.
To stop reading or drastically reduce the number of one's postings to a
newsgroup:
Larry Wall and Randal Schwartz left clp.misc.
See, it's simple when you can invent your own defintions for words :)
Colin
------------------------------
Date: Wed, 23 Sep 1998 22:26:51 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <slrn70itda.h4e.adelton@aisa.fi.muni.cz>
On Wed, 23 Sep 1998 12:38:04 -0400, John Porter <jdporter@min.net> wrote:
> From what resource(s) did you learn Perl?
>
> . Llama v.1
> . Llama v.2
> X Camel v.1
> X Camel v.2
> X Other book (give name)
Mastering Regular Expressions
> X Docs included in the distribution
> . Something on the WWW
> X Studying existing code
> . Class/tutor
And clp.misc, some time ago.
is it a shame I skipped LLama? ;-)
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: Wed, 23 Sep 1998 16:55:24 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <coqbu6.935.ln@flash.net>
Philip T. Kasiecki (pkasieck@cognex.com) wrote:
: : . Something on the WWW
: A little from here.
Q: What does comp.lang.perl.misc have to do with the WWW.
A: Nothing.
The WWW is one service offered on the Internet. It uses HTTP.
Usenet is a different service offered on the Internet. It uses NNTP.
Usenet != World Wide Web
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 23 Sep 1998 17:00:33 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <12rbu6.935.ln@flash.net>
Rich Grise (richgrise@entheosengineering.com) wrote:
: Matt Knecht wrote:
: >
: > When I'm done learning perl, I'll let you know! So far I've been at it
: > for almost 7 months now. I have a feeling I have quite of bit time left
: > to go.
: > Matt Knecht - <hex@voicenet.com>
: Excellent point - maybe the question should be,
: "How did you learn enough perl to start hacking Matt's scripts?"
Or:
"How did you learn enough perl to recognize that many of Matt's scripts
are significantly sub-optimal"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 23 Sep 1998 15:51:46 -0700
From: Farhad Farzaneh <ff@creative.net>
To: Steve Adams <smadams@ozemail.com.au>
Subject: Re: printing to a file - variables cause carriage returns??
Message-Id: <36097B82.DD08B9A9@creative.net>
See below:
>
> #!/usr/bin/perl
> print "E-mail Forwarding\n\n";
> print "Enter your UserID : ";
The user's carriage return is returned to you in:
> $userid=<STDIN>;
replace it with
chomp($userid = <STDIN>);
and you'll be fine. Note that if you actually do read in the $password and
$email, you'll have to do the same thing for them as well.
> print "Enter your password : ";
> $password=<>;
> print "Enter the e-mail address to forward to : ";
> $email=<>;
> open (FILE_HANDLE, ">$userid");
> print FILE_HANDLE "user ","$userid $password\nput .forward\nbye";
> close(FILE_HANDLE);
>
> THE FILE CREATED ($USERID) ALWAYS LOOKS LIKE THIS
>
> user userid
> password
>
> put .forward
> bye
>
> THE FILE LAYOUT NEEDS TO LOOK LIKE THIS
>
> user userid password
> put .forward
> bye
Farhad Farzaneh
------------------------------
Date: 23 Sep 1998 22:03:55 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: problems with dates being off by 1 day
Message-Id: <6ubr8b$qmp$2@marina.cinenet.net>
Troy Bull (troy.bull@uni.edu) wrote:
: I have an online calendar program I got off the www. It gets heavy use at
: my site. The problem is this, 99% of the time everything appears find, once
: and a while, dates are displayed 1 day off.
:
: We have the newest version of Perl (we just got the new version a few days
: ago). Anyone have any ideas
Without a sample of your code (just a few lines showcasing the relevant
part, please), it's very difficult to tell. My first guess would be that
you're displaying time relative to the 'wrong' (vs. your expectations)
time zone. That would result in dates being 'right' (24-n)/24 of the
time, though, where n > 0. :)
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Wed, 23 Sep 1998 16:48:08 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: question about variable interpolation in search pattern
Message-Id: <oaqbu6.935.ln@flash.net>
Richard Ann (rann@bbn.com) wrote:
: I have a question about variable interpolation and run-time compilation
: for search patterns. For the script below:
[snip]
: This got me wondering if the variable $foo actually got interpolated, so
: on another line in the input file I have the string
: hello $foo
: but I don't see the "Found matching line" printout either.
Because the dollar sign is a metachar in regexen.
It matches the end of the line.
if($line =~ /\Q$template_line/) { # escape regex metachars
: Given that I've tried both these test cases, I cannot figure out what
: the end-result search pattern is -- what is it?
/hello $foo/; # you only get one round of interpolation
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 23 Sep 1998 15:08:21 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Rotating an array.
Message-Id: <MPG.10731134b9d1cf8f9897b5@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <6ubo8u$dl1$1@client3.news.psi.net> on 23 Sep 1998 21:13:02
GMT, Abigail <abigail@fnx.com> says...
> Casper Kvan Clausen (ckc@dmi.dk) wrote on MDCCCXLIX September MCMXCIII in
> <URL: news:Pine.GSO.3.92.980923163020.6326Z-100000@edb>:
> ++ I'm mainly asking this to see what sorts of strange and twisted answers
> ++ you guys can come up with, since, given the fickle nature of Usenet, I
> ++ doubt any answers will appear in time to make into my code.
>
> @a = @a [$rot .. $#a, 0 .. $rot - 1];
#!/usr/local/bin/perl -w
use Benchmark;
my @a = ('a' .. 'z');
my $rot = 2;
timethese (1 << (shift || 0), {
Slice => sub { @a = @a[$rot .. $#a, 0 .. $rot - 1] },
Splice => sub { push @a, splice @a, 0, $rot },
} );
Benchmark: timing 16384 iterations of Slice, Splice...
Slice: 16 secs ( 7.29 usr 0.04 sys = 7.33 cpu)
Splice: 0 secs ( 0.63 usr 0.01 sys = 0.64 cpu)
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 23 Sep 1998 19:58:42 GMT
From: sb@engelschall.com (Steffen Beyer)
Subject: Re: Rotating an array.
Message-Id: <6ubjti$av4$1@en1.engelschall.com>
Casper Kvan Clausen <ckc@dmi.dk> wrote:
> The problem is this: Given an array A of n elements, how do you most
> efficiently construct a new array B containing the same elements, but
> rotated so that B[0] = A[n-m], B[1] = A[n-m+1] ... B[m] = A[n]?
@B = ( (@A)[(($n-$m) .. $n)] );
Yours,
--
Steffen Beyer <sb@engelschall.com>
Free Perl and C Software for Download: www.engelschall.com/u/sb/download/
------------------------------
Date: Wed, 23 Sep 1998 21:33:30 GMT
From: tim@tpickup.demon.co.uk (tim pickup)
Subject: sending email attachments using just perl?
Message-Id: <36096761.31631561@news.demon.co.uk>
I am writnig a perl script which sends an email built up on an html
form on a browser. Similar to the service yahoo/hotmail provides.
The problem is I want to attach a local file to the email message.
I think yahoo.com uses java to encode the file and attach it.
Is there a way of doing this directly using just perl?
Thanks
tim
------------------------------
Date: Wed, 23 Sep 1998 17:22:38 -0500
From: "Clarence Washington Jr." <cwashing@ix.netcom.com>
Subject: Windows NT Scripting Resources.
Message-Id: <6ubsak$6nn$1@farragut.paranet.com>
Win32 Scripting
Resources for Vbscript, Jscript, Perl, Python, Kixtart
Check it out
http://cwashington.netreach.net
Win32 bit scripting, Nearly 80 sample admin scripts, downloads,
reference files, and technical support via an online discussion forum.
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 3806
**************************************