[8290] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1907 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Feb 16 17:27:29 1998

Date: Mon, 16 Feb 98 14: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, 16 Feb 1998     Volume: 8 Number: 1907

Today's topics:
    Re: A Pubilc Apology. <tchrist@mox.perl.com>
    Re: A Pubilc Apology. <ljz@asfast.com>
    Re: A Pubilc Apology. (John Moreno)
    Re: Can Comm.pl handle arrows key (Andrew M. Langmead)
    Re: Can't use string ("") as a subroutine ref while "st <tchrist@mox.perl.com>
    Re: Can't use string ("") as a subroutine ref while "st <tchrist@mox.perl.com>
    Re: Expand hash elements in string? (Rick Freeman)
    Re: Forgery => Killfile (Martin Oakley)
    Re: generate gif images with perl ? (Martin Vorlaender)
    Re: Global vars vs. access methods: WAS foreach and my( <dformosa@st.nepean.uws.edu.au>
        Is It Possible? <tony@furness.co.uk>
    Re: Modules for axcessing the Phone Book Data file from <chris@ixlabs.com>
    Re: MS Visual Perl (A Satire!) <chris@ixlabs.com>
    Re: Perl use on IIS 4 (Martin Vorlaender)
    Re: Perl-to-"C" converter? <tchrist@mox.perl.com>
    Re: RFC about "Matt's Script Archive" (Leslie Mikesell)
        sucess stories? <stvhoof@netvision.net.il>
    Re: sucess stories? (Jim Michael)
    Re: sucess stories? (Abigail)
    Re: sucess stories? (Abigail)
    Re: sucess stories? <sfarrell+usenet@farrell.org>
    Re: System function to variable <tchrist@mox.perl.com>
    Re: The meaning of sort (Andrew M. Langmead)
        Using getopts() and exec() (EXCHANGE:CAR:5J42)
    Re: Your Wishes Granted [was: TENDERS INVITED] <webmaster@fccj.cc.fl.us>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 15 Feb 1998 23:26:15 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: A Pubilc Apology.
Message-Id: <6c7tin$o0i$3@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, les@MCS.COM (Leslie Mikesell) writes:
:The problem is that the way to send a copy by email in rn/trn is to
:stick the email address in the CC: header and the news posting and
:email copy are thus identical.  

Please check the current message your receive from me.  This 
behaviour is different now.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
    "That is not dead which can eternal lie
    And with strange aeons, even death may die."
	    --H.P. Lovecraft


------------------------------

Date: 15 Feb 1998 10:29:35 -0500
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: A Pubilc Apology.
Message-Id: <luk9awga3k.fsf@asfast.com>

phenix@interpath.com (John Moreno) writes:

> Joseph N. Hall <joseph@5sigma.com> wrote:
>
> > By the way, I think it's completely outer space weird to say that
> > an email cc: is "rude."  Been USENET-ing 11 years now and that's
> > the first time I've heard *that* complaint.  Time was when the proper
> > thing to do was reply via email and leave posting to the gurus.
> 
> I wasn't suggesting that you shouldn't move it to mail - that's often
> the best thing, but doing both, unless you have a reason to think the
> person needs to see your response quicker or that it is urgent that they
> DO see your response, isn't necessary.

Many things that aren't necessary are still desirable.  In some cases,
the poster desires an email response to a post, and the response also
has value to the newsgroup at large.  One place this tends to occur
(out of several) is when the poster is asking for an email response to
a technical question that others might also be wondering about.

Furthermore, I have found during my 11+ years on the net that less
than 5% of the people to whom I've sent "courtesy emails" have ever
complained to me about this, or expressed any discomfort about this at
all.  I number you among the small percentage of people to whom I will
be careful not to send such emails.  In other words, just because
*you* find "courtesy emails" to be rude, this doesn't mean that
everyone else feels the same way.  On the contrary, many people seem
to welcome them, and until I hear otherwise from the majority of my
fellow usenet denizens, I will continue to judiciously send out these
"courtesy emails" to those who don't object to them.  I'm sure that
many people here agree with me.

-- 
 Lloyd Zusman
 ljz@asfast.com


------------------------------

Date: Sun, 15 Feb 1998 22:23:16 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: A Pubilc Apology.
Message-Id: <CEDF18E8A4E85765.ADF4A50393CE4936.96C14DF3926A5581@library-proxy.airnews.net>

Lloyd Zusman <ljz@asfast.com> wrote:

> phenix@interpath.com (John Moreno) writes:
> 
> > Joseph N. Hall <joseph@5sigma.com> wrote:
> >
> > > By the way, I think it's completely outer space weird to say that
> > > an email cc: is "rude."  Been USENET-ing 11 years now and that's
> > > the first time I've heard *that* complaint.  Time was when the proper
> > > thing to do was reply via email and leave posting to the gurus.
> > 
> > I wasn't suggesting that you shouldn't move it to mail - that's often
> > the best thing, but doing both, unless you have a reason to think the
> > person needs to see your response quicker or that it is urgent that they
> > DO see your response, isn't necessary.
> 
> Many things that aren't necessary are still desirable.  

It CAN be necessary or desirable - but it's neither if it's done without
thought.

> In some cases, the poster desires an email response to a post, and the
> response also has value to the newsgroup at large.  One place this tends
> to occur (out of several) is when the poster is asking for an email
> response to a technical question that others might also be wondering
> about.

Fine.  Then you thought about or your newsreader responded to the
Mail-Copies-To header, in either case it's apropriate.

> Furthermore, I have found during my 11+ years on the net that less
> than 5% of the people to whom I've sent "courtesy emails" have ever
> complained to me about this, or expressed any discomfort about this at
> all.

I seldom complain - I just ignore it.  And when I do complain it's
usually because they didn't clearly say whether it was posted and
mailed.

> I number you among the small percentage of people to whom I will
> be careful not to send such emails.

It's not necessary to be careful not to send me email - if you think
it's necessary then that's fine (well unless I find the content
offensive).

> In other words, just because *you* find "courtesy emails" to be rude, this
> doesn't mean that everyone else feels the same way.  On the contrary, many
> people seem to welcome them, and until I hear otherwise from the majority
> of my fellow usenet denizens, I will continue to judiciously send out
> these "courtesy emails" to those who don't object to them.  I'm sure that
> many people here agree with me.

You are completely mistaking the thrust of what I am saying - you use
the word "judiciously".  This is WONDERFUL, GREAT, TERRIFIC - just
EXACTLY what you should be doing.  Sending cc only after "judicious"
consideration.  Sending cc without "judicious" consideration IS rude.

-- 
John Moreno


------------------------------

Date: Sun, 15 Feb 1998 18:06:26 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Can Comm.pl handle arrows key
Message-Id: <EoFMAq.J0L@world.std.com>

ywang@news (Yongyan Wang) writes:

>How can I send a "arrow key" char to the remote job, which 
>is initialized using Comm.pl.

You may want to take <URL:http://www.perl.com/CPAN/modules/
by-module/Curses/Curses-1.01.tar.gz> to find the correct escape
sequences for the default terminal. Then send those sequences to the
other processes connected to the pty.

-- 
Andrew Langmead


------------------------------

Date: 16 Feb 1998 01:47:40 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Can't use string ("") as a subroutine ref while "strict refs" in use
Message-Id: <6c85rs$5n7$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, bill@astro.fccj.cc.fl.us writes:
:                } else {
:                        &$vSub;
:                }
:
:But I still get this -
:Can't use string ("") as a subroutine ref while "strict refs" in use at

Logic bug: you didn't init $vSub for the else case.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
    "That's okay.  Anyone whose opinion he cares about already knows that
    he doesn't care about their opinion."
    	--Larry Wall


------------------------------

Date: 15 Feb 1998 23:44:32 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Can't use string ("") as a subroutine ref while "strict refs" in use
Message-Id: <6c7ul0$qhc$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, bill@astro.fccj.cc.fl.us writes:
:                $vSub = 'Admin'   if (substr($vFlag, 1, 5) eq 'ADMIN');
:Can't use string ("") as a subroutine ref while "strict refs" in use at

Assign a reference like \&Admin, not a string like 'Admin'.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com


Sometimes when you fill a vacuum, it still sucks.   --Rob Pike


------------------------------

Date: Mon, 16 Feb 1998 00:45:02 GMT
From: rick@marinweb.com (Rick Freeman)
Subject: Re: Expand hash elements in string?
Message-Id: <34eb8b8e.30277783@nntp2.ba.best.com>

On Mon, 16 Feb 1998 00:26:33 GMT, I wrote:
>I know I can expand the variables in a string like this:
>s/\$(\w+)/${$1}/g
>
>How can I expand hash elements...
>$text = 'this has a $foo{bar} in it';

OK, I know I can make it work if I know in advance the name if the
hash:
s/\$jobdata{(\w+)}/$jobdata{$1}/g

That's not exactly what I want, though.  I'd like to be able to do it
all at once (for multiple hashes, that is).

Thanks,
Rick

M a r i n W e b

Marin's Home on the World Wide Web
http://www.marinweb.com/

98 Main Street #453
Tiburon CA 94920
415-458-3201


------------------------------

Date: Sun, 15 Feb 1998 23:38:39 GMT
From: meo@qld.mim.com.au.SPAMMERGOHOME (Martin Oakley)
Subject: Re: Forgery => Killfile
Message-Id: <6c7ua0$aog$1@news.mel.aone.net.au>

Kent Perrier <kperrier@Starbase.NeoSoft.COM> wrote:

>meo@qld.mim.com.au.SPAMMERGOHOME (Martin Oakley) writes:

>> 
>> Well Tom probably won't see this post (if spam is a case-insensitive
>> match), but I've got to point out that not everyone has an environment
>> where mail filters are possible. Some,  myself included, are forced to
>> use M$ mailers though NO fault of their own.
>> So without incoming mail filtering , one does what one can to reduce
>> the clutter at the source.
>> 

>Oh good Lord!  EIther go out and purchase a copy of Eudora Pro or use
>(gasp) the email client in Communicator (but please turn off the html
>publishing feature first) and use the built in filter functions of these
>clients.

>There are plenty of mail clients on M$ operating systems that have built
>in filtering.

Sorry, perhaps I wasn't clear. I am using the M$ mail client, because
we use M$ MAIL Post office. This isn't POP-3 or IMAP, it is built on
the very lame principle of a shared directory. It has an SMTP gateway,
which allows incoming mail from the net. So, while I can use any News
reader I like, and in fact any SMTP mail client to send mail, Eudora,
Pegasus, Communicator etc, will not be able to read my mail. Incoming
mail will be delivered to the M$ Post office, and will need to be read
by a compatible mail client.

It is likely that other 'LAN' based email systems suffer the same
limitations. Due to proprietary (non tcp/ip) protocols, the choice of
mail clients is limited.





------------------------------

Date: Sun, 15 Feb 1998 07:41:19 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: generate gif images with perl ?
Message-Id: <34e68e0f.524144494f47414741@radiogaga.harz.de>

LE CORRE (lecorre@magic.fr) wrote:
: Does someone know where I can find infos about generating gif images with
: perl (like a counter do) ?
: thanks (I have already perl scripts counter but it's not enough)

Randal Schwartz' WebTechniques column #13 gives a comprehensive
discussion of the usage of the GD library and its Perl wrapper GD.pm to
output counters. It's at
http://www.stonehenge.com/merlyn/WebTechniques/col13.html

The GD library was written by Tom Boutell and is to be found under
http://www.boutell.com/ . GD.pm was written by Lincoln Stein and can be
found at CPAN under http://www.perl.com/CPAN/modules/by-module/GD/

Hope it helps,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


------------------------------

Date: 16 Feb 1998 01:07:25 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Global vars vs. access methods: WAS foreach and my() [GUTS; LONG]
Message-Id: <887591204.39806@cabal>

In <6c53pn$7to$1@nnrp2.dejanews.com> Chris_Schoenfeld@sonic.net writes:

[...]

>If you do not use OOT, you can still use access subs for accessing
>global data - the variable is still global, but you still get *more*
>safely by making an agreement with yourself to access it by sub.

Or make use of lexical closures.

{
  my psydo_global;

  sub set_psydo {
     psydo_global=shift;
  }

  sub get_psydo {
     return psydo_global;
  }
}

--
Please excuse my spelling as I suffer from agraphia see the url in my header. 
Never trust a country with more peaple then sheep. 
Support NoCeM http://www.cm.org/                   
I'm sorry but I just don't consider 'because its yucky' a convincing argument


------------------------------

Date: Sun, 15 Feb 1998 14:57:48 -0000
From: "Tony Kenny" <tony@furness.co.uk>
Subject: Is It Possible?
Message-Id: <6c708m$s3s$1@svr-c-02.core.theplanet.net>

I was wondering what the furthest limit is of perl.  Is it possile with
current libraries and modules available to write a stand alone program with
perl that includes a GUI etc.  Such as a front end to a CDROM training
product. ?

Also, is it possible to turna perl program into a single exe file, embedding
commands that would normally only work with UNIX so that they will work on
Win95 / NT ?

Thanks for any help.

Tony Kenny
tony@furness.co.uk






------------------------------

Date: Sun, 15 Feb 1998 15:28:44 -0800
From: Chris Schoenfeld <chris@ixlabs.com>
To: "David A. Frantz" <_wizard@eznet.net>
Subject: Re: Modules for axcessing the Phone Book Data file from Outlook Express
Message-Id: <34E77A2B.D4F1CD61@ixlabs.com>

You would probably be *much* better off doing this in Visual Basic for
Applications, if OE supports it - see that NG.

-Chris

David A. Frantz wrote:
> 
> What I'am looking for is a perl module that will allow me to access the
> Outlook Express Phnoebook File.
> 
> The intent is to custom print the data file with the records sorted by the
> Company Field.    If anybody has an idea or has done this pointers would be
> nice.
> 
> Thanks
> 
> Dave

-- 
---
Chris Schoenfeld
IX Development Laboratories
Santa Rosa, California


------------------------------

Date: Sun, 15 Feb 1998 15:27:19 -0800
From: Chris Schoenfeld <chris@ixlabs.com>
To: bill@astro.fccj.cc.fl.us
Subject: Re: MS Visual Perl (A Satire!)
Message-Id: <34E779D7.70B2D581@ixlabs.com>

I missed the beginning of this thread, but Visual Perl is an ActiveState
realease - you can get on the notification mailing list at their
website.


-Chris

Bill Jones wrote:
> 
> P++ would be pronouced 'PP', because that would about what it is worth :-)
> 
> Martin Vorlaender wrote:
> 
> > Stuart Bullock (stuart_bullock@bigfoot.com) wrote:
> > :      Microstuff Announce MS Visual Perl 2.0 - A Satire
> > :      =================================================
> >
> > Let's all hope it continues to be a satire...
> >
> > cu,
> >   Martin
> >
> > P.S.: The official product name of course is MS Visual P++  :-)
> > --
> >                           | Martin Vorlaender | VMS & WNT programmer
> >  Ceterum censeo           | work: mv@pdv-systeme.de
> >  Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
> >                           | home: martin@radiogaga.harz.de

-- 
---
Chris Schoenfeld
IX Development Laboratories
Santa Rosa, California


------------------------------

Date: Sun, 15 Feb 1998 08:22:45 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Perl use on IIS 4
Message-Id: <34e697c5.524144494f47414741@radiogaga.harz.de>

Ted Thomas (tthomas@netacc.net) wrote:
[IIS 4 and registry settings for CGI and SSI]

AFAIK, IIS doen't support SSI, apart from ASP.
(Someday, I'm going to join the All American Association Against Acronym Abuse
Anonymous (AAAAAAA) :-)

: It appears that some of the settings for IIS 4 are quite different from IIS 3

Yup. Micro$oft changed it all (again)...

IIRC, IIS 4 settings are managed through the Management Console (which is part
of NT5, but gets installed with IIS 4).

BTW: Please consider to post your question to a newsgroup more appropriate
     to this, like comp.infosystems.www.authoring.cgi. Micro$oft has a news
     feed at msnews.microsoft.com, with a group dedicated solely to IIS.

cu,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


------------------------------

Date: 16 Feb 1998 01:52:35 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl-to-"C" converter?
Message-Id: <6c8653$5n7$2@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, Craig Busko <crb@netunlimited.net> writes:
:Anyone know if a perl-to-"c" coneverter exists?  

This is discussed in section 3 of the Perl FAQ, distributed
since 5.004 as part of the standard distribution.

    $ man perlfaq3

The answer is that yes, there is one, but no, it won't
do you the least bit of good.

And yes, I do get tired of answering this question more times
than you can possibly imagine.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    s = (char*)(long)retval;                /* ouch */
        --Larry Wall in doio.c from the perl source code


------------------------------

Date: 15 Feb 1998 20:19:37 -0600
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: RFC about "Matt's Script Archive"
Message-Id: <6c87np$5ms$1@Venus.mcs.net>

In article <6c7u58$6a@fridge.shore.net>,
Nathan V. Patwardhan <nvp@shore.net> wrote:
>Bart Lateur (bart.mediamind@tornado.be) wrote:
>
>: I didn't actually mean you, Tom. In fact, I would by far prefer it (for
>: example; I won't force you) if you would write some more articles in the
>: "far more than you ever wanted to know" series. That might have been the
>
>So who did you mean, then?  There are many computer professionals in
>this group who don't have time to do things gratis, particularly
>things that will require a lot of time.  I'd be happy to rewrite
>Matt's scripts ... when I have time to do so.  :-)

There appear to be a lot of people with time to post critical comments
but if anyone bothered to include useful content I must have missed
it.  What bad things will happen to someone with FormMail.pl running
on their site?

  Les Mikesell
     les@mcs.com


------------------------------

Date: Sun, 15 Feb 1998 14:57:41 -0500
From: Tzadik Vanderhoof <stvhoof@netvision.net.il>
Subject: sucess stories?
Message-Id: <34E748B5.954@netvision.net.il>

We have a large project coming up that is now in the early design
stages and we are getting to the stage of choosing an implementation
language.  The project will be a Web appliaction that will access data
stored on a mainframe through SNA.  I brought up Perl as a possibility
but was instantly shot down because "this is going to be a large
application, not a little script".  I pointed out that many "large
applications" had already been written in Perl but was not able to
produce any examples.  I looked around in www.perl.com and on the
Newsgroups and FAQs and was not able to come up with anything.  Where
could I find such examples (success stories) of large successful
applications that have been done in Perl (preferably similar to our
project).  The main objection seemed to be that "we need a compiled
language, with strong type-checking."  They are leaning toward Java.
When I showed someone the chapter on Object-Oriented programming in the
Camel Book, they said it looked too complicated and new developers would
not be able to get the hang of it.  Perl is already used here quite a
bit, but only for relatively small tasks.

I'd greatly appreciate an email response as well, if possible!


------------------------------

Date: Sun, 15 Feb 1998 15:36:26 GMT
From: genepool@netcom.com (Jim Michael)
Subject: Re: sucess stories?
Message-Id: <genepoolEoFFCq.Arp@netcom.com>

Tzadik Vanderhoof (stvhoof@netvision.net.il) wrote:
: Newsgroups and FAQs and was not able to come up with anything.  Where
: could I find such examples (success stories) of large successful
: applications that have been done in Perl (preferably similar to our
: project).  The main objection seemed to be that "we need a compiled

Well, it's probably pretty trivial compared to your application, but how 
about the Human Genome Project?


------------------------------

Date: 15 Feb 1998 15:44:13 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: sucess stories?
Message-Id: <6c72gd$djl$1@client2.news.psi.net>

Tzadik Vanderhoof (stvhoof@netvision.net.il) wrote on 1629 September 1993
in <URL: news:34E748B5.954@netvision.net.il>:
++
++ When I showed someone the chapter on Object-Oriented programming in the
++ Camel Book, they said it looked too complicated and new developers would
++ not be able to get the hang of it.


They are probably right on that aspect. I regard Perl as unsuitable to
develop OO material in an environment with more than one programmer.

To do proper inheritance, you need to know the names the inherited
object uses for its internal state, to avoid conflicts. But that
breaks the entire concept "hiding" the implementation from the
user. Abstraction isn't possible. 

Multiple inheritance is only possible if you are lucky. But if you want
to inherit class A from one programmer and class B from another, and
they use different internal datastructures, you're hosed. Can't do it.

It's a shame that where perl does so well with package and lexicals,
it is utterly confusing when it comes to objects.



Abigail
-- 
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-


------------------------------

Date: 15 Feb 1998 23:39:05 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: sucess stories?
Message-Id: <6c7uap$npv$8@client2.news.psi.net>

Nathan V. Patwardhan (nvp@shore.net) wrote on 1629 September 1993 in
<URL: news:6c7hp2$g78@fridge.shore.net>:
++ 
++ I'm proud to announce that (a) I was able to complete a large, robust
++ application written in Perl, and (b) lost 20 pounds in the process.

I wish I could do b)


Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


------------------------------

Date: Sun, 15 Feb 1998 18:51:28 GMT
From: stephen farrell <sfarrell+usenet@farrell.org>
Subject: Re: sucess stories?
Message-Id: <87ra54n1lb.fsf@phaedrus.uchicago.edu>

abigail@fnx.com (Abigail) writes:

> Tzadik Vanderhoof (stvhoof@netvision.net.il) wrote on 1629 September 1993
> in <URL: news:34E748B5.954@netvision.net.il>:
> ++
> ++ When I showed someone the chapter on Object-Oriented programming in the
> ++ Camel Book, they said it looked too complicated and new developers would
> ++ not be able to get the hang of it.

It's not really more complicated, it's just a little bit different.

> To do proper inheritance, you need to know the names the inherited
> object uses for its internal state, to avoid conflicts. But that
> breaks the entire concept "hiding" the implementation from the
> user. 

Just prefix your member data (e.g., for package FooBar, your member
data should look like fb_whatever): problem solved.

OO is very nice in perl, and very transparent...   

> Abstraction isn't possible. 

Well, it doesn't enforce making good interfaces/abstraction barriers
(like public in C++ and in idl for corba), but it also doesn't
/prevent/ you from doing this either.  As a consequence it *DOES*
require more discipline for a large project.

What's missing most sorely (IMHO) is strong typing, and similarly
setting up prototypes for hashes so that you can't misspell hash keys
and also strong typing of those references as well.  (though the
mispelling is moot with emacs and dabbrev-expand).

--sf


------------------------------

Date: 16 Feb 1998 02:48:48 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: System function to variable
Message-Id: <6c89eg$9h5$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, michael@datahost.com writes:
:I am trying to get the current date and stick it in a variable.

Is there some reason why neither the scalar sense localtime
nor the POSIX::strftime is to your liking?

:I have tried several things like:
:$tempdate ="date '+%A %B %e, %Y'";
:$temppath1= "tempfile";
:system ($tempdate) >> $temppath1;

Hello?  Ceci n'est pas un shell.  That's a rightward bitshift operator,
and highly silly.  Did you know that -w would have pointed this out?

Did you also know that man perlfaq8 contains the following question:

       Why can't I get the output of a command with system()?

:open (DATEVAR,"+< tempfile") || die ("Can't Open tempfile\n");

Did you know that if you don't print $!, no one will ever know
why it didn't work?

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    Some are born to perl, some achieve perl, and some have perl
    thrust upon them.  


------------------------------

Date: Sun, 15 Feb 1998 18:13:35 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: The meaning of sort
Message-Id: <EoFMMq.LqG@world.std.com>

Gene Wilburn <genew@rom.on.ca> writes:

>the
>entries area actually part of a longer string delimited by pipes, so
>that the entries are stored in the array as

>	Events|data
>	Events - Coming|data
>	Events - Archived|data

Then probably the best thing to do is to extract the data you want to
sort out, and then sort on that subset of the data.

This technique is shown in <URL:http://www.perl.com/CPAN/doc/manual/
html/pod/perlfaq4/How_do_I_sort_an_aray_by_anyth.html>
-- 
Andrew Langmead


------------------------------

Date: Sun, 15 Feb 1998 11:12:30 -0500
From: "Grant Totten (EXCHANGE:CAR:5J42)" <grantt@americasm01.nt.com>
Subject: Using getopts() and exec()
Message-Id: <34E713EE.EBAE6398@americasm01.nt.com>

Howdy all,

I've got a stumper for you.  I'm trying to write a program that will
parse command-line options using Getopt::Std::getopts() and optionally
exec() itself, making sure to not lose any of the remaining options.
Now, before you ask 'what in the hell are you doing this for?', here is
why I want to do this.

This program is to be a command-line front-end for our software
development environment, based on clearcase.  When you do a 'cleartool
setview' (to get into clearcase), you get a new shell.  So the only way
to do OTHER things, like set environment variables, umask, home
directory, etc., is to use the 'cleartool setview -exec' option.  This
works fine, so far.  Additionally, the 'newgrp' command that I'm using
has a '-e' for exec option, so I can set to a new group as well.  The
trick is that the program, gosde, invokes a 'newgrp -e $0' and a
'cleartool setview -exec $0' to re-launch itself in the new shell.

Still with me?  Good.  Now comes the tricky part.

Command-line parsing gets a bit munged up when I use the exec() call.
 For example,

exec ($CLEARTOOL, 'setview', '-exec', $0, $opt_v);

will do the required 'setview' and re-execute this script.  This is a
Good Thing.  However, any other command-line switches that we had are
lost.  So I tried using this:

$command_line = "$CLEARTOOL, 'setview', '-exec', $0, $opt_v".;
exec ($command_line);

but the options are all treated as one; I assume because they're all
part of a string.

Does anyone know how I can fix this?

One option I have considered is setting the various options as
environment variables.  Then the subsequent invocation of the script can
read the options out of the environment variables.  But that would be
very ugly.

Any suggestions would be greatly appreciated,

Grant Totten
Nortel Public Data Networks
grantt@nortel.ca



------------------------------

Date: Sun, 15 Feb 1998 04:31:18 GMT
From: Bill Jones <webmaster@fccj.cc.fl.us>
To: Denis Goddard <dgoddard@us.oracle.com>
Subject: Re: Your Wishes Granted [was: TENDERS INVITED]
Message-Id: <34E66E87.D2352CBB@fccj.cc.fl.us>

Stop!  ROTFLOL!  You're killing me!

:-)

Denis Goddard wrote:

> Dear John and Windy,
>
> I am pleased to announce that I have granted *ALL* your wishes!
> I was able to do this owing to my professional experience with Software
> Requirements. The requirements you have so thoughtfully supplied greatly
> simplified my task, which was made all the easier by Perl itself, and
> some of the more powerful modules on CPAN. Read on!
>
> John and Widy wrote:
> >
> > Tenders are invited for the contruction of a software app which will:
> >
> > (1) Allow me to write a contents page, each item active
>
> Okay. Here goes:
>
>           perl -e 'print "You are allowed!\n";'
>
> That was easy, what next...?
>
> > (2) Allow me to write chapters, occasional word active (I need to choose
> > which ones after I finish writing
>
> Not only can I do this, but I will close that dangling parenthesis:
>
>           perl -e 'print "You are allowed! )\n";'
>
> > (3) Each page needs a [Contents], [previous page] and [next page]
> > buttons
>
> OOOOooooo... THIS one is a little harder:
>
>           #!/usr/bin/perl
>           use CGI; my $love = new CGI;
>           print $love->start_html; print $love->startform;
>           print $love->submit('Action','Contents');
>           print $love->submit('Action','previous page');
>           print $love->submit('Action','next page');
>
> > (4) I need to insert graphic illustrations at will
>
>           perl -e "print img {-src=>'fred.gif',-align=>'LEFT'};"
>           # Right from the FAQ, jack!
>
> > (5) Final publication must be a single exe file, or at least secure from
> > tampering
>
>           chmod 0 perlscript
>
> > (6) Final publication must be printable, but not Copy/Paste-able
>
>           chmod 444 perlscript
>
> > (6) I will provide graphics as required for Name of App, Headers,
> > Footers etc.
>
>            require 'etc.pl';
>
> > Please reply by email, at your earliest convenience. Tenders close Feb
> > 22, 1998. Lowest or any tender not necessarily accepted.
>
> How's Free?
>
> >
> > Thanks in advance
> >
> > JOHN WRIGHT
>
> You're welcome.
>
> -Denis
>
> --
>      __  __  _  __     __
> ~~~~(__)|-< /-\(__ |__(-_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Denis Goddard, Senior Member, Tech. Staff  |"I see the heads of men arise
> email: dgoddard@us.oracle.com              |with hungry minds and open eyes!"
> ourworld.compuserve.com/homepages/d_goddard| -Rush, from 2112: _The Oracle_





------------------------------

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 1907
**************************************

home help back first fref pref prev next nref lref last post