[18142] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 310 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 18 14:06:17 2001

Date: Sun, 18 Feb 2001 11:05:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <982523111-v10-i310@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 18 Feb 2001     Volume: 10 Number: 310

Today's topics:
    Re: (OFF TOPIC) Re: This is driving me nuts and I need  <no@email.com>
    Re: (OFF TOPIC) Re: This is driving me nuts and I need  (Randal L. Schwartz)
    Re: (OFF TOPIC) Re: This is driving me nuts and I need  <no@email.com>
    Re: (OFF TOPIC) Re: This is driving me nuts and I need  (Steven Smolinski)
        ANNOUNCE: moodss-13.2 <jfontain@free.fr>
        directing system() output to a var <dave@netterra.com>
    Re: directing system() output to a var (Eric Bohlman)
    Re: directing system() output to a var <krahnj@acm.org>
    Re: directing system() output to a var (Rudolf Polzer)
    Re: e-mail notifier <tore@extend.no>
    Re: FAQ 4.24:   How do I reformat a paragraph? (Peter J. Acklam)
    Re: FAQ 4.24:   How do I reformat a paragraph? <flavell@mail.cern.ch>
        grep web database <mecks@ust.hk>
    Re: grep web database (Tad McClellan)
    Re: perlcc <gst@sysfrog.org>
    Re: Project with a large amount of external data <gwhite@the-whites.net>
    Re: PROPOSAL: Graphics::ColorNames <wlkngowl@unix.asb.com>
    Re: PROPOSAL: Graphics::ColorNames <wlkngowl@unix.asb.com>
    Re: PROPOSAL: Graphics::ColorNames <iltzu@sci.invalid>
    Re: Re: Linda, this is cool! <no@email.com>
    Re: Reading NewsGroups (Abigail)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sun, 18 Feb 2001 16:39:09 GMT
From: "Frank Miller" <no@email.com>
Subject: Re: (OFF TOPIC) Re: This is driving me nuts and I need a guru
Message-Id: <NUSj6.440089$U46.12968618@news1.sttls1.wa.home.com>

(see my response below...)

"jb" <jbroz@transarc.ibm.com> wrote in message
news:3A895C8D.A4B029E2@transarc.ibm.com...
> "Godzilla!" wrote:
> >
> [ ... ]
> > Our Perl group here, is a slice of this larger problem. Our Perl
> > group well exemplifies how people, each looking to satiate her
> > or his unhealthy ego, will abuse others without hesitation. Some
>
> That's an opinion. The only thing I object to is seeing the same (usually
> off topic) question being posted again and again and reading questions
here
> that are more appropriate to c.l.p.modules. It's obvious that many posters
> haven't read the documentation (save the doc rants) and, in most cases,
> haven't even bothered to solve the problem themselves ('Here's my
question,
> tell me the answer!'). If I were a regular poster I would have probanbly
> stopped bothering long ago.
>
> Posting in jeopardy sytle makes it even more annoying, so much so that the
> group is, sadly, painful to read much of the time. I'm surprised that many
> of the regulars still post (but a good killfile does help :)
>
> joe

I realize that it may be frustrating to long time readers and posters to
have people like myself pop into the list to ask questions and not "follow
the rules".  I don't mind following the rules, I am not out to offend
anyone, but the problem I see if that rather than nicely tell me the rules,
people flame me and others.

I was just flamed (and killfiled I'm sure) but three people yesterday
because I:

a) Didn't read the FAQ.   The flamer told me to I was supposed to "read the
FAQ" before posting.  But this person didn't even bother to spare 20 extra
characters to tell me where the FAQ was.  I didn't know about the FAQ.  I
loved reading the FAQ.  It answer many of my questions.  But why was I
flamed?  I would have much rather been nicely pointed to the FAQ (as a
follow-up poster did).

b) My jeopardy style posting.  OK.  Once again, I've never liked having to
scroll down through the whole message to get to the one line answer, I
always like reading the answer and if it sounds interesting, I'll go read
the question.  Personal preference.  A quick look of the messages on this
group show quite a few JS postings, so I don't think it's fair to flame me
for not "knowing" that posting like this was wrong.  Once again, a little
kindness would go a long way.

c) Not lurking for three weeks before posting.  I find this particular
frustrating.  I am new to Perl.  I had been reading the list for 3 or 4 days
before I posted.  I had a question that I needed answered.  I could not find
the solution to it myself.  So I posted it here.  I really think it's unfair
to say that someone should have to lurk for three weeks before posting.
Isn't the point of this news group to ask questions and learn?  Attitudes
like this just foster elitism.

Please don't take this as an attack.  It is easy to misconstrue what people
mean, I may have done that to my "flamers".  All I'm saying is to give
people the benefit of the doubt before you jump on them.

I'm just here to learn.

FrankM











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

Date: 18 Feb 2001 08:47:03 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: (OFF TOPIC) Re: This is driving me nuts and I need a guru
Message-Id: <m18zn4x7js.fsf@halfdome.holdit.com>

>>>>> "Frank" == Frank Miller <no@email.com> writes:

Frank> a) Didn't read the FAQ.  The flamer told me to I was supposed
Frank> to "read the FAQ" before posting.  But this person didn't even
Frank> bother to spare 20 extra characters to tell me where the FAQ
Frank> was.  I didn't know about the FAQ.  I loved reading the FAQ.
Frank> It answer many of my questions.  But why was I flamed?  I would
Frank> have much rather been nicely pointed to the FAQ (as a follow-up
Frank> poster did).

When you install software, you're expected to poke around a bit in it
before lurking out to support resources.  The FAQ is listed as the 4th
item when you type "man perl" (or perhaps "perldoc perl").  You are
expected to at least have spent 15 minutes poking in your own
documentation!

Frank> b) My jeopardy style posting.  OK.  Once again, I've never
Frank> liked having to scroll down through the whole message to get to
Frank> the one line answer, I always like reading the answer and if it
Frank> sounds interesting, I'll go read the question.  Personal
Frank> preference.  A quick look of the messages on this group show
Frank> quite a few JS postings, so I don't think it's fair to flame me
Frank> for not "knowing" that posting like this was wrong.  Once
Frank> again, a little kindness would go a long way.

When you post to Usenet, you're expected to read the Usenet manual
first.  "news.announce.newusers" is the location, to which you should
have been already subscribed.  If you ignored that subscription, shame
on you.  If your newsreader did not have you read that first, shame on
the distributor of your newsreader.

Frank> c) Not lurking for three weeks before posting.  I find this
Frank> particular frustrating.  I am new to Perl.  I had been reading
Frank> the list for 3 or 4 days before I posted.  I had a question
Frank> that I needed answered.  I could not find the solution to it
Frank> myself.  So I posted it here.  I really think it's unfair to
Frank> say that someone should have to lurk for three weeks before
Frank> posting.  Isn't the point of this news group to ask questions
Frank> and learn?  Attitudes like this just foster elitism.

This is again Usenet rules, not comp.lang.perl.* rules.  There's
a culture to Usenet, described in "news.announce.newusers".  Read
there first.

Violating the culture... *any* culture... is often seen as a threat,
and the members of that culture generally react (whether right or
wrong) in methods to control the damage.  On Usenet, this often
appears as "flaming".

print "Just another Perl hacker," # and member of Usenet culture since 1980

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Sun, 18 Feb 2001 18:00:25 GMT
From: "Frank Miller" <no@email.com>
Subject: Re: (OFF TOPIC) Re: This is driving me nuts and I need a guru
Message-Id: <Z4Uj6.440403$U46.12982533@news1.sttls1.wa.home.com>

> When you install software, you're expected to poke around a bit in it
> before lurking out to support resources.  The FAQ is listed as the 4th
> item when you type "man perl" (or perhaps "perldoc perl").  You are
> expected to at least have spent 15 minutes poking in your own
> documentation!
>

I spent a lot more then 15 minutes poking around.  I've read website after
wesbite on perl.  I've read the man pages.  I have a stack of Perl books
next to me.  I just missed the FAQ.  Sorry.  It would appear that a lot of
people miss the FAQ.  Once again, I don't mind being told to read the FAQ.
I just found it rude to be told to "read the FAQ" and then not even be point
to it.  Once agian.  Just be nice about it.

> When you post to Usenet, you're expected to read the Usenet manual
> first.  "news.announce.newusers" is the location, to which you should
> have been already subscribed.  If you ignored that subscription, shame
> on you.  If your newsreader did not have you read that first, shame on
> the distributor of your newsreader.

Once agiain.  Sorry.  The thing I find so strange is that of all the news
groups I post to, the most obnoxious ones are the programming and technical
ones.  Groups unrelated to computers seem to get along a lot better.  I've
never been flamed for my posting style before and I've been on and off of
readnews since 1986.  Once again.  My point is not what I or others did or
did not do, it's that there are better ways to get people to do what you
want then jumping on them.

FYI:  I just went and looked at news.announce.newusers.  I contains one
entry: "how to become a Usenet site".  If the information about how to
format your posts is buried in this document, then I doubt very many people
are going to see it.  I realise there are a lot of lazy jerks that post, but
just give people a little benefit of the doubt.

>
> This is again Usenet rules, not comp.lang.perl.* rules.  There's
> a culture to Usenet, described in "news.announce.newusers".  Read
> there first.
>
> Violating the culture... *any* culture... is often seen as a threat,
> and the members of that culture generally react (whether right or
> wrong) in methods to control the damage.  On Usenet, this often
> appears as "flaming".
>

LIke I said above.  Other groups seem to be a lot more torerant then the
technical ones.  I've just never had a problem before coming to this group.
I will conform.

FrankM





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

Date: Sun, 18 Feb 2001 18:19:41 GMT
From: sjs@linux.ca (Steven Smolinski)
Subject: Re: (OFF TOPIC) Re: This is driving me nuts and I need a guru
Message-Id: <slrn99090j.12o.sjs@ragnar.stevens.gulch>

Frank Miller <no@email.com> wrote:
> Once agiain.  Sorry.  The thing I find so strange is that of all the news
> groups I post to, the most obnoxious ones are the programming and technical
> ones. 

I find that good technical groups try to enforce a tiny level of
professionalism: they don't abide people spouting nonsense; they don't
abide laziness or cluelessness.  Groups which do not have any standards
end up being a mass of the blind leading the blind.

Not knowing about the FAQ is generally a case of laziness or
cluelessness.  It keeps getting proven on this ng hundreds of times
daily.  That there may be the odd exception is unfortunate, but really,
how remote is it that someone won't know about the FAQ?

- Type perldoc and read the usage message.  Pointer to the FAQ.
- The main perl manpage points to the faq on the first page.
- www.perl.com has "FAQ" on their main navigation.
- It's mentioned on this ng several times a day.
- a search for "perl faq" on google yields the thing as the first
  listing.

It's hard work to avoid konwing about the FAQ!

Steve
-- 
Steven Smolinski => http://www.steven.cx/


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

Date: Sun, 18 Feb 2001 18:51:16 GMT
From: Jean-Luc Fontaine <jfontain@free.fr>
Subject: ANNOUNCE: moodss-13.2
Message-Id: <3A901992.276ABC31@free.fr>

Hi everybody: here is a new version of moodss.


Check it out! (or at least the screenshots at
http://jfontain.free.fr/moodss3.gif or
http://jfontain.free.fr/moodss4.gif :).


Notes:
- moodss modules can now be written in Perl! Sample Random and
Minimal modules are provided. Documentation (see Random.pm file)
needs improving. Feedback is highly welcomed.
- please let me know if you are interested in writing modules in
Python or Ruby

### CHANGES ###

--- version 13.2 ---
fully documented Perl modules development in HTML documentation
errors that occured in the loading phase of a Perl module were not
  properly printed out
implemented colored relief in selected pie labels
MySQL mystatus and myvars modules updated to support 3.23.33 server
Perl module programmers: INCOMPATIBLE (but logical) change: data
  switches and sort members are now hashes instead of arrays (see
  Random.pm for examples)
removed the ~!^|;',? characters from the allowed module name set
removed typo in apachex module code

### README ###

This is moodss (Modular Object Oriented Dynamic SpreadSheet) version
13.2.

Moodss won in the Best System Admin Technology category (Tcl Tips and
Tricks, Valuable Real World Programming Examples) at the O'Reilly
Tcl/Tk 1999 Conference.
Linux Magazine calls it a "lifesaver".
Tucows gives it 5 stars (cows or penguins :-).

Moodss is a modular application. It displays data described and
updated in one or more modules, which can be specified in the command
line or dynamically loaded or unloaded while the application is
running. Data is originally displayed in tables. Graphical views
(graph, bar, 3D pie charts, ...), summary tables (with current,
average, minimum and maximum values) and free text viewers can be
created from any number of table cells, originating from any of the
displayed viewers. Thresholds can be set on any number of cells.

Specific modules can easily be developed in the Tcl and Perl scripting
languages or in C.

A thorough and intuitive drag'n'drop scheme is used for most viewer
editing tasks: creation, modification, type mutation, destruction,
 ... and thresholds creation. Table rows can be sorted in increasing or
decreasing order by clicking on column titles. The current
configuration (modules, tables and viewers geometry, ...) can be saved
in a file at any time, and later reused through a command line switch,
thus achieving a dashboard functionality.

The module code is the link between the moodss core and the data to be
displayed. All the specific code is kept in the module package. Since
module data access is entirely customizable (through C code, Tcl,
Perl, HTTP, ...) and since several modules can be loaded at once,
applications for moodss become limitless.
For example, thoroughly monitor a dynamic web server on a single
dashboard with graphs, using the Apache, MySQL, cpustats, memstats,
 ...  modules. If you have replicated servers, dynamically add them to
your view, even load the snmp module on the fly and let your
imagination take over...

Along with a core trace module, random, ps, cpustats, memstats,
diskstats, mounts, route, arp, kernmods, netdev, pci, system, MySQL
(myquery, mystatus, myprocs, myvars) modules for Linux, ping, snmp and
snmptrap for UNIX, apache and apachex modules are included (running
"wish moodss ps cpustats memstats" mimics the "top" application with a
graphic edge and remote monitoring capability).

Thorough help is provided through menus, widget tips, a message area,
a module help window and a global help window with a complete HTML
documentation.

Moodss is multi-langual thanks to Tcl internationalization
capabilities. So far only English and partially French are
supported. Help with other languages will be very warmly welcomed.

Development of moodss is continuing and as more features are added in
future versions, backward module code compatibility will be maintained.

I cannot thank the authors of the tkTable, BLT, MIME/SMTP and the HTML
libraries enough for their great work.

In order to run moodss, you need to install the following packages
(unless you can use the rpm utility, see below):
Tcl/Tk 8.3.1 or above, at (or at a mirror near you)
  http://dev.scriptics.com/ or ftp://ftp.scriptics.com/
the latest tkTable widget library at:
  http://www.hobbs.wservice.com/tcl/main.html
the latest BLT library at:
  ftp://tcltk.sourceforge.net/pub/tcltk/blt/
eventually the latest tclperl library for writing modules in Perl at:
  http://jfontain.free.fr/
(see the INSTALL file for complete instructions, for UNIX and also
Windows platforms).

You also have the option of using the moodss rpm file (also in my
homepage), if you are using a Redhat Linux system (6.0 or above).
You can find the required tcl, tk, tktable, blt, tcpperl and other
rpms at: http://jfontain.free.fr/

Whether you like it (or hate it), please let me know. I would like to
hear about bugs and improvements you would like to see. I will correct
the bugs quickly, especially if you send me a test script (module code
with a data trace would be best).

###

you may find it now at my homepage:

http://jfontain.free.fr/moodss-13.2.tar.gz
http://jfontain.free.fr/moodss-13.2-1.i386.rpm
http://jfontain.free.fr/moodss-13.2-1.spec

and a bit later at:

ftp://contrib.redhat.com/ in libc6 sub-directory.

Enjoy and please let me know what you think.


--
Jean-Luc Fontaine  mailto:jfontain@free.fr  http://jfontain.free.fr/






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

Date: Sun, 18 Feb 2001 08:31:45 GMT
From: dave <dave@netterra.com>
Subject: directing system() output to a var
Message-Id: <3A8F88BF.47FD9016@netterra.com>

Ok I'm stuck on this one. I'm writing a script to ping a host and report
back the avg ping. I'v been calling ping with

system("ping -c 1 $host |grep time")  #the grep is to get the output
down to the line I want.

but system() outputs to <STDOUT> and I can assign its output to a var,
how can I get this to work.



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

Date: 18 Feb 2001 09:27:02 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: directing system() output to a var
Message-Id: <96o4h6$guq$2@bob.news.rcn.net>

dave <dave@netterra.com> wrote:
> but system() outputs to <STDOUT> and I can assign its output to a var,
> how can I get this to work.

Take a look at the documentation for system().  It will explain why 
system() isn't what you want and what to use instead.



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

Date: Sun, 18 Feb 2001 10:36:00 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: directing system() output to a var
Message-Id: <3A8FA6BC.25F04010@acm.org>

dave wrote:
> 
> Ok I'm stuck on this one. I'm writing a script to ping a host and report
> back the avg ping. I'v been calling ping with
> 
> system("ping -c 1 $host |grep time")  #the grep is to get the output
> down to the line I want.
> 
> but system() outputs to <STDOUT> and I can assign its output to a var,
> how can I get this to work.

my $line = grep /time/, `ping -c 1 $host`;


John


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

Date: Sun, 18 Feb 2001 12:06:03 +0100
From: rpolzer@web.de (Rudolf Polzer)
Subject: Re: directing system() output to a var
Message-Id: <slrn98vb4r.rr.rpolzer@rebounce.rpolzer-lx>

Eric Bohlman <ebohlman@omsdev.com> schrieb Folgendes:
> dave <dave@netterra.com> wrote:
> > but system() outputs to <STDOUT> and I can assign its output to a var,
> > how can I get this to work.
> 
> Take a look at the documentation for system().  It will explain why 
> system() isn't what you want and what to use instead.

my $out = `perl -e "systen '$cmd';"`;

SCRN

-- 
#!/usr/bin/perl
eval($0=q{$0="\neval(\$0=q{$0});\n";for(<*.pl>){open X,">>$_";print X
$0;close X;}print''.reverse"\nsuriv lreP trohs rehtona tsuJ>RH<\n"});
####################### http://learn.to/quote #######################


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

Date: Sun, 18 Feb 2001 19:33:16 +0100
From: Tore Aursand <tore@extend.no>
Subject: Re: e-mail notifier
Message-Id: <MPG.14fa33d653c1bb049898b8@news.online.no>

In article <Pine.BSF.4.21.0102171205110.12653-100000@localhost>, 
rick@akirapc.com says...
>> Have you searched for any modules on CPAN [1]?  Nah - I didn't think 
>> so...

> Everybody is so friendly around here.  How heart warming.

Thank you.  We are only spending our valuable sparetime to help other 
people.

> As a matter of fact, I did search through all of the e-mail modules.

And you didn't find a module which let you this for you?  I think I 
found more than one, in fact...


-- 
Tore Aursand - tore@extend.no - http://www.extend.no/~tore/


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

Date: 18 Feb 2001 11:50:38 +0100
From: jacklam@math.uio.no (Peter J. Acklam)
Subject: Re: FAQ 4.24:   How do I reformat a paragraph?
Message-Id: <wkofw0717m.fsf@math.uio.no>

cfedde@fedde.littleton.co.us (Chris Fedde) writes:

> I have changed the text in my copy of
> perl-5.6.1-TRIAL2/pod/perlfaq4.pod to read as follows:
> 
>     [snip]
> 
> If this meets with approval I'll forward it to the
> perl5-porters.

Please do.

Peter

-- 
sub int2roman{@x=split//,sprintf'%04d',shift;@r=('','I','V','X','L','C','D'
,'M');@p=([],[1],[1,1],[1,1,1],[1,2],[2],[2,1],[2,1,1],[2,1,1,1],[1,3],[3])
;join'',@r[map($_+6,@{$p[$x[0]]}),map($_+4,@{$p[$x[1]]}),map($_+2,@{$p[$x[2
]]}),map($_+0,@{$p[$x[3]]})];}print "@{[map{int2roman($_)}@ARGV]}\n";#JAPH!


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

Date: Sun, 18 Feb 2001 12:57:21 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: FAQ 4.24:   How do I reformat a paragraph?
Message-Id: <Pine.LNX.4.30.0102181254260.31611-100000@lxplus003.cern.ch>

On Sun, 18 Feb 2001, Chris Fedde wrote:

[...]
>     Text::Wrap re-formats ascii text to width and flush left.  It
>     leaves the text ragged right.
>
>     If what you want is typesetting quality justification then you
>     could use perl to output your text in troff, LaTeX or some other
>     typesetting format.

If we're voting on this, then I'm happy with that.   Thanks.  ;-)



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

Date: Sun, 18 Feb 2001 18:18:22 +0800
From: Jim <mecks@ust.hk>
Subject: grep web database
Message-Id: <3A8FA16E.9ACF29DE@ust.hk>

Hi
    Can someone tell me if perl have/haven't got a function
which can grep the web database data directly?
    What I mean is that, I have a web page which have a lot of
weather data which is free for download. And the page is look
like something as below

data_1
data_2
data_3

which is a hyperlink to the database. Can perl grep it by simple
function
like

#!/usr/local/bin/perl
while(<somepage>) {
    "some function to grep the data "
}

Thanks for your hints.

Jim



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

Date: Sun, 18 Feb 2001 06:34:18 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: grep web database
Message-Id: <slrn98vcpq.esl.tadmc@tadmc26.august.net>

Jim <mecks@ust.hk> wrote:

>Can perl grep it by simple
>function
>like
>
>#!/usr/local/bin/perl
>while(<somepage>) {
>    "some function to grep the data "


   print if /data_2/; # type "perldoc perlre" to learn about pattern matching


>}


You can write grep(1) as a Perl one-liner:

   perl -ne 'print if /data_2/'  database.web

or

   perl -ne 'print "$ARGV: $_" if /data_2/'  database.web other.web


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 18 Feb 2001 20:00:51 +0100
From: Guenther Starnberger <gst@sysfrog.org>
Subject: Re: perlcc
Message-Id: <87g0hbstng.fsf@nirvana.sysfrog.org>

Geoff Toogood <geoff@brainstorm.net.au> writes:

> How do I let perlcc know about these?  HELP???!! I am using debian
> linux's standard patato release and an i386 box. My attempted
> compilation output is below....

install the package libgdbmg1-dev

/gst

-- 
sysfrog.org


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

Date: Sun, 18 Feb 2001 09:37:30 -0500
From: "Greg White" <gwhite@the-whites.net>
Subject: Re: Project with a large amount of external data
Message-Id: <V6Rj6.5144$nI3.34295@nntp0.chicago.il.ameritech.net>

"Bob Walton" <bwalton@rochester.rr.com> wrote in message
news:<3A8F2C14.5C635851@rochester.rr.com>...
> Greg White wrote:
> >
> > I am a long time coder, recently adding Perl to my toolbelt.  I have a
> > fairly sophisticated project, it uses several module files, in addition
I
> > have, some configuration and "templates" that are kept in external files
> > (about 10) as well as common subroutines.  The templates and
configuration
> > files contain parts the end user will change occasionally.  Should I
look to
> > merge all these parts into one or two files, or ???????  I want to keep
the
> > user friendliness, but avoid the performance hit, or is the performance
hit
> > of loading 10-15 files inconsequential?  I realize there is not one
right
> > answer, but I am seeking opinions.
> >
> > Greg
> You'll need to supply additional information if anyone is to give you a
> meaningful answer.  Like what do you mean by inconsequential?  Less than
> 10 seconds?  10 minutes?  10 milliseconds?

enough time to matter ;-)

>You say "large" amount of
> data.  100 bytes?  100 Kb?  100 Mb?  100 Gb?

closer to 100 kb, text messages, directory & database config items and the
ever popular global variables.

>I would supposed that
> reading 10 to 15 files would not be a big performance hit compared with
> loading the same information from one or two files.  By that I mean that
> a user wouldn't notice the difference.

what about 200 users hitting this script at about the same time being used
as a CGI script?
> --
> Bob Walton




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

Date: Sun, 18 Feb 2001 08:29:28 -0500
From: Robert Rothenburg <wlkngowl@unix.asb.com>
Subject: Re: PROPOSAL: Graphics::ColorNames
Message-Id: <3A8FCE38.34F1F1CD@unix.asb.com>



Martien Verbruggen wrote:
> [..] 
> alternatively, you could provide several colour name spaces, either by
> loading a different module, or as an option:
> 
> use Graphics::Colors 'X';
> 
> I do suggest strongly to allow both the spelling Color and Colour, from
> the beginning on.

I've thought of something like that, because of conflicting names.

Another method might be to use tied hashes and allow one script to
access multiple schemes, or even specify a priority of schemes:

  tie %xcolors, 'Graphics::Colors', qw( X );
  tie %windoescolors, 'Graphics::Colors', qw( X HTML3 Windows );

  @RGB = @{ $xcolors{'silver'} };

I may even differentiate types of colors:

  # Import grayscale color names
  tie %xcolors, 'Graphics::Colors', qw( X-Gray );

Of course, I don't want to make the module too complex for something
that's relatively simple. If the module's too bloated, it will
discourage use in a
lot of places.

And my reason for writing this is so that I do not have to add this
functionality to one of my own modules but to encourage users to use a
shared color naming scheme.

Of course utility subroutines to go with the tied hashes would be nice.
One would like to be able to return a 24-bit number of HTML-style hex
code.

(Maybe I've thought about this a little too much? ;)


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

Date: Sun, 18 Feb 2001 08:35:25 -0500
From: Robert Rothenburg <wlkngowl@unix.asb.com>
Subject: Re: PROPOSAL: Graphics::ColorNames
Message-Id: <3A8FCF9D.C627D054@unix.asb.com>


Thanks. I'll be using 'standard' color name definitions though.


Damian Conway wrote:
> 
> Robert Rothenburg <wlkngowl@unix.asb.com> writes:
> 
>    > I think a module which has common color names would be useful.
> 
> I have a paper on that. ;-)
> 
>         http://www.csse.monash.edu.au/~damian/papers/#Colour
> 
> If you're building such a module, you might find it of interest.
> 
> Damian


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

Date: 18 Feb 2001 16:26:20 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: PROPOSAL: Graphics::ColorNames
Message-Id: <982511735.17024@itz.pp.sci.fi>

In article <3A8FCE38.34F1F1CD@unix.asb.com>, Robert Rothenburg wrote:
>
>Another method might be to use tied hashes and allow one script to
>access multiple schemes, or even specify a priority of schemes:
>
>  tie %xcolors, 'Graphics::Colors', qw( X );
>  tie %windoescolors, 'Graphics::Colors', qw( X HTML3 Windows );

Would you really need _tied_ hashes?  It seems to me a conventional
hash of, say, RGB hex strings would work.  (Except perhaps for case
sensitivity issues -- could you just declare that all color names are
always fully lowercased?)

  use Graphics::Colornames;   # I like that name better

  my $htmlcolors = colornames('HTML');  # hashref in scalar context
  my %xcolors = colornames('X');        # full hash in list context

  print qq(<font color="#$xcolors{blue}">);  # X colors in HTML


>  @RGB = @{ $xcolors{'silver'} };

You could always supply utility functions to convert the hex strings
(which are convenient because they take little memory -- though more
than just integers) into other representations.


>Of course, I don't want to make the module too complex for something
>that's relatively simple. If the module's too bloated, it will
>discourage use in a lot of places.

If you want to avoid bloat, the first thing to do is to split each
namespace into a separate file.  The exact mechanism for this is up to
you; autoloading and submodules are both possible, but so are simple
tab-delimited files you can read into the hashes as necessary.


>One would like to be able to return a 24-bit number of HTML-style hex
>code.

As I've said above, I'd consider that the most convenient internal
representation.  A three-element array for each color would consume
quite a bit of memory.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"I suspect most of what I know about rat breeding *won't* be helpful,
 though."                  -- Mary Gentle in rec.arts.sf.composition

Please ignore Godzilla and its pseudonyms - do not feed the troll.


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

Date: Sun, 18 Feb 2001 15:54:30 GMT
From: "Frank Miller" <no@email.com>
Subject: Re: Re: Linda, this is cool!
Message-Id: <WeSj6.439784$U46.12965104@news1.sttls1.wa.home.com>

"Mindfield" <mindfield@badgers.emulationnet.com> wrote in message
news:21gu8tsoknv01eegt4jak2lo7180kijno5@4ax.com...
> On Sat, 17 Feb 2001 17:46:47 -0500, "Steve D. Perkins"
> <stevedperkins@NOSPAM.hotmail.com> drooled an embarassing wet spot in
> his lap as he typed:
>
[snip]
>
> Fortunately many ISPs have gotten wise and have placed posting caps on
> duplicate messages, but spambots have found ways to circumvent that --
> by placing a random number after the subject line, by rotating the
> subject line from a list of subject lines, by placing random ASCII
> text at the end of each message, etc.

I have always wondered why spam had those extra characters at the end of the
subject lines and messages.  Thanks!  You've answered one of my 10 most
sought after questions!

FrankM




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

Date: 18 Feb 2001 12:52:16 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Reading NewsGroups
Message-Id: <slrn98vhc0.jcc.abigail@tsathoggua.rlyeh.net>

Tom (tom75@MailAndNews.com) wrote on MMDCCXXVIII September MCMXCIII in
<URL:news:3ABDF6F0@MailAndNews.com>:
'' Hi,
'' 
'' I have working knowledge of perl and trying to read usenet through a 
'' perl/cgi 
'' script.
'' 
'' I'll be grateful if someone can help me out with related procedures.


Let's see, so far you have nothing done yourself, for something where
there are perfectly good alternatives available. Furthermore, you are
asking here for something off-topic. Both the CGI and the various
Usenet procedures (or rather protocols) have nothing to do with Perl
and are discussed elsewhere.

Perhaps you should do a little work yourself instead of begging to
be spoonfed.



Abigail
-- 
perl -wlpe '}$_=$.;{' file  # Count the number of lines.


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V10 Issue 310
**************************************


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