[13053] in Perl-Users-Digest
Perl-Users Digest, Issue: 463 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 11 14:07:18 1999
Date: Wed, 11 Aug 1999 11:05:12 -0700 (PDT)
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, 11 Aug 1999 Volume: 9 Number: 463
Today's topics:
Re: About qq() and need help (Greg Bacon)
Re: array and file processing <uri@sysarch.com>
Re: CGI Error - CGI application misbehaved (I R A Darth Aggie)
CGI timeout problem <diggem@cat.com>
Re: Flocking, whassat? <jbc@shell2.la.best.com>
Re: Initializing variables [was Re: is our reese the au <uri@sysarch.com>
Re: is our reese the author of mysql book? <elaine@chaos.wustl.edu>
Re: is our reese the author of mysql book? <uri@sysarch.com>
Re: is our reese the author of mysql book? (I R A Darth Aggie)
Re: Japanese Girl Needs Help. (Steve Linberg)
Re: Looking for a good Perl Book (I R A Darth Aggie)
Re: Moving a Perlscript from NT to LINUX <schmickl@magnet.at>
Re: New to Perl: File manipulation Question <laurens@bsquare.com>
Re: NO-ONE USES PERLQT !!!!!!!!!!!!!!!!!!!!!??????????? <schmickl@magnet.at>
Perl is eating up my memory <cfang@nwu.edu>
Re: Perl is eating up my memory (Steve Linberg)
Re: reference to object method <uri@sysarch.com>
Re: reference to object method (Greg Bacon)
Re: Regexp newbie <salvador@my-deja.com>
Re: Regexp newbie (Anno Siegel)
Re: Reset .. ie clear out a hash array <aqumsieh@matrox.com>
Re: Reset .. ie clear out a hash array <aqumsieh@matrox.com>
Re: s/// and interpolation (Steve Linberg)
Re: searching complex data structure <Joe.Kline@sdrc.com>
Testing (Chris)
Re: Time:: Hires <abhargav@rational.com>
Re: turn $6 into $6000 (I R A Darth Aggie)
Re: Using Mail::Header and Mail::Internet <rootbeer@redcat.com>
What's ePerl ? (John Robson)
Re: What's ePerl ? (Steve Linberg)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 11 Aug 1999 17:48:19 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: About qq() and need help
Message-Id: <7osd13$l20$3@info2.uah.edu>
In article <37B1855E.63A57C5D@hotmail.com>,
Guideline Chan <yoursguideline@hotmail.com> writes:
: $alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
: 'abcdefghijklmnopqrstuvwxyz'.
: '0123456789+/';
: $_="vq7O";
: eval qq{ tr!$basealphabet!\0-\77!; };
:
: What's the meaning of the fifth line??? Is it equivalent to
: tr/$basealphabet/\0-\77/; ?? if not, what does it equivalent to???
Did you read the perlop manpage? If you had, you would have seen
Note that because the transliteration table is built at compile
time, neither the SEARCHLIST nor the REPLACEMENTLIST are subjected
to double quote interpolation. That means that if you want to use
variables, you must use an eval():
eval "tr/$oldlist/$newlist/";
die $@ if $@;
eval "tr/$oldlist/$newlist/, 1" or die $@;
Reading the docs is a lot faster (and a lot more reliable) than asking
someone else to do it for you via Usenet.
Greg
--
These are but a very few of the examples of ignominy in this celluloid
developed in the fiery pits of Hell.
-- Christian Analysis on American Culture on the South Park movie
------------------------------
Date: 11 Aug 1999 13:18:18 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: array and file processing
Message-Id: <x7r9la8cdh.fsf@home.sysarch.com>
hey, questionexchange,
any chance you could use a proper newsreader and not mangle the quoted
text? it is impossible to read the code when you wrap it to hell. so
stop hiding behind your website and just read and post here directly.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 11 Aug 1999 14:45:14 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: CGI Error - CGI application misbehaved
Message-Id: <slrn7r337t.d9h.fl_aggie@thepentagon.com>
On Wed, 11 Aug 1999 14:34:50 GMT, goparajs@usa.redcross.org
<goparajs@usa.redcross.org>, in <7os1m9$9f9$1@nnrp1.deja.com> wrote:
+ use CGI qw(:all);
All well and good, but you may want to also include:
use CGI::Carp 'fatalsToBrowser';
so you can see what perl is complaining about before the server gets
a Content-Type header...
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Wed, 11 Aug 1999 12:18:11 -0500
From: "Duane G. Meyer" <diggem@cat.com>
Subject: CGI timeout problem
Message-Id: <37B1B053.6FE6BA38@cat.com>
I did a 'little' bit of searching and couldn't seem to come up with any
info about this.
I have a CGI script which is used to migrate files from one server to
another. It basically writes out a simple shell script with the commands
needed to get the files where they are going. My problem is when I have
a LARGE number of files, the browser wants to think the connection is
dead and gives up. What I want to do is, while this shell process is
running, print something to the brower every so often to keep it
'entertained'. What's a good way to accomplish this? Fork off a process?
Mebbe I should read up on forking, but that just sounds a little messy.
If I let the shell script run in the background is there a way to tell
when it's finished, and I can quit feeding the browser 'dummy' data to
keep the connection alive?
Anyway, while I read a little more, if anybody has a ready answer, I
would appreciate some help.
TIA,
Duane
------------------------------
Date: 11 Aug 1999 17:31:35 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Re: Flocking, whassat?
Message-Id: <37b1b377$0$201@nntp1.ba.best.com>
Eric Bohlman <ebohlman@netcom.com> wrote:
> And one of the main reasons we roast The Other Matt to a crisp in this
> group is that most of his freely-available scripts do *not* deal with
> this situation correctly.
I describe a guestbook script at
http://www.lies.com/begperl/
that deals with locking more or less correctly. (At least I hope it
does. I based the locking parts on recipe 7.11 from the Perl Cookbook.)
The site features an explanation of the issues involved that doesn't
assume too much knowledge on the part of the reader.
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: 11 Aug 1999 13:11:47 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Initializing variables [was Re: is our reese the author of mysql book?]
Message-Id: <x7vham8coc.fsf@home.sysarch.com>
>>>>> "SL" == Steve Linberg <linberg@literacy.upenn.edu> writes:
SL> I understand and appreciate your explanation. I don't initialize
SL> variables to avoid warnings, I do it because (a) improperly
SL> initialized variables are a major source of bugs in general, and
SL> (b) it makes it easier for me to look back on and grok my own
SL> code. Although it isn't so important in Perl, it sure was in
SL> assembler way back when, and even in some of the early (crufty) C
SL> compilers I used, where defined but uninitialized variables would
SL> contain whatever memory they happened to be mapped to.
SL> It's a habit that I have no matter what language I'm writing in.
SL> Sometimes it's important, sometimes it isn't, and usually I'm too
SL> lazy to burn braincells thinking about it. Although I do the
SL> majority of my work in Perl these days, I still feel overall that
SL> it's a habit that has served me well, maybe at the expense of a
SL> few cycles and electrons.
it is not a horrible habit as coding ones go. i respect your history of
how you got it. you have earned the right to do it that way.
SL> What I'm wondering, as I respect your superior knowledge and
SL> experience, is whether and why you think it's a *bad* idea, or
SL> whether it's more that you just regard it as unnecessary and
SL> slighly wasteful.
the latter. it is one of the reasons we use perl and not c nor assembler
as much today. we don't have to sweat the petty stuff (nor pet the
sweaty stuff).
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: Wed, 11 Aug 1999 13:21:34 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: is our reese the author of mysql book?
Message-Id: <37B1B0B7.1C1DCAFE@chaos.wustl.edu>
Scott Oglesby wrote:
> Perhaps you haven't visited http://www.mattwright.com ...
> (yes, it is _the_ Matt Wright)
and japhy made his fan page! LOL. I wonder if he attends the
champaign-urbana perl mongers meetings....
e.
------------------------------
Date: 11 Aug 1999 13:27:43 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: is our reese the author of mysql book?
Message-Id: <x7n1vy8bxs.fsf@home.sysarch.com>
>>>>> "E-A" == Elaine -HFB- Ashton <elaine@chaos.wustl.edu> writes:
E-A> Scott Oglesby wrote:
>> Perhaps you haven't visited http://www.mattwright.com ...
>> (yes, it is _the_ Matt Wright)
E-A> and japhy made his fan page! LOL. I wonder if he attends the
E-A> champaign-urbana perl mongers meetings....
boy, this just proves what an asshole he is.
Anyway, what they're trying to do looks cool, and
hopefully it will help correct/fix some of the bugs in my
code I just haven't had the time or energy to do myself
lately.
has he ever fixed a bug or rewritten any of his crap in years?
My programs work well enough to be used by many, I
make no assertions that they are "good" or "better
than others" and this will help patch some bugs I
haven't had time to lately. Also, please follow
copyrights.. re-distribution of my scripts is not
allowed...
<repeat above comment>
this is another reason why we should build a decent cgi repository. his
stuff will infect kiddies for years if we don't.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 11 Aug 1999 16:56:55 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: is our reese the author of mysql book?
Message-Id: <slrn7r3aup.dlk.fl_aggie@thepentagon.com>
On Wed, 11 Aug 1999 16:18:59 GMT, John Porter <jdporter@min.net>, in
<slrn7r38ji.1f7.jdporter@min.net> wrote:
+ In fact, I've never seen *anything* from the mind of Matt Wright
+ apart from the wretched Perl code. Maybe he's an experimental
+ perl-generating back-end from some backwater R&D lab...
No, he actually exists. As Randal said in his blurb [paraphrased]
"this code will serve as motivation for writing your own". Indeed.
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Wed, 11 Aug 1999 13:52:23 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Japanese Girl Needs Help.
Message-Id: <linberg-1108991352240001@ltl1.literacy.upenn.edu>
In article <o%hs3.10$0K.808@iad-read.news.verio.net>, "Kaori"
<kaori@japanesegirl.com> wrote:
> Can this be done? Yes? No?
Yes, it can be done. You need to provide a lot more detail if you're
asking for help, though. And a more descriptive subject line (related to
the problem or question) will help too.
Good luck!
--
Steve Linberg, Systems Programmer &c.
National Center on Adult Literacy, University of Pennsylvania
Be kind. Remember, everyone you meet is fighting a hard battle.
print 'Just Another Perl ' . $perl_hierarchy[(USER+EXPERT)/2];
------------------------------
Date: 11 Aug 1999 16:59:40 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Looking for a good Perl Book
Message-Id: <slrn7r3b3u.dlk.fl_aggie@thepentagon.com>
On Wed, 11 Aug 1999 11:29:22 -0400, Elaine -HFB- Ashton
<elaine@chaos.wustl.edu>, in <37B1966D.772CD4BB@chaos.wustl.edu>
wrote:
+ abigail++ :) Marry me darling.
Exsqueeze me? Where do I have to submit my proposal?
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Wed, 11 Aug 1999 19:35:17 +0200
From: Thomas Schmickl <schmickl@magnet.at>
Subject: Re: Moving a Perlscript from NT to LINUX
Message-Id: <37B1B455.6A3156BD@magnet.at>
... but do you know anything how to solve the problem I mentioned ? Have
you ever transfered a text from NT to LINUX ?
Ciao, thomas.
------------------------------
Date: Wed, 11 Aug 1999 10:08:03 -0700
From: "Lauren Smith" <laurens@bsquare.com>
Subject: Re: New to Perl: File manipulation Question
Message-Id: <7osalo$iql$1@brokaw.wa.com>
Kevin Newman wrote in message <37B17E04.572475CD@mcs.com>...
>I'm very new to PERL and have a few questions on how to create :
>1) an edited temprary file of an original file that is being read in
Open the original file. Open the temporary file. Read lines in from
the original file, print lines out to the temporary file.
>2) edit and save the original file in place
If you want to edit and save the original file in place, why do you need
a temporary file?
>I am able to create the temporary file but I get the
>error message:
>Use of uninitialized value at "filename" line nn, <> chunk nn.
>Where "filename" = the perl filename and nn = a number.
>What does this mean? How do I correct it?
You have an error on or before line nn.
But seriously folks,
perldiag "Use of uninitialized value"
Lauren
------------------------------
Date: Wed, 11 Aug 1999 19:31:40 +0200
From: Thomas Schmickl <schmickl@magnet.at>
Subject: Re: NO-ONE USES PERLQT !!!!!!!!!!!!!!!!!!!!!?????????????????????????
Message-Id: <37B1B37C.9BD3B078@magnet.at>
David Cassell schrieb:
> Pavel Ravits wrote:
> [a complete absence of content]
> ...
> ve received from gnat. Otherwise, you'll just get yourself
> plonked at the speed of light. I can already hear Abigail
> pressing that oversized 'K' on Abigail's keyboard...
>
> HAND,
> David
Maybe, for somebody who had never had a drink with Abigail, what
does THIS absence of understandable human language mean.
Do I need a Perl-script to convert it in something like english, urdu or
sanskrit.
PLEASE, for some poor non-understanding ignorants, can you explain us
whats the meaning of the "plonk" and the big "K" ??? PLEEAAAASE !!!!!
Ciao, thomas.
------------------------------
Date: Wed, 11 Aug 1999 11:50:20 -0500
From: "Chao Fang" <cfang@nwu.edu>
Subject: Perl is eating up my memory
Message-Id: <7os9or$2di@news.acns.nwu.edu>
I used a array to hold 8M of one digit number. However Perl used up to 240M
of memory and the process is hang up finally.
I run the script on a SUN Ultra5 with 128M and Solaris. I use 'top' command
to watch how much memory is used.
The script is quite simple and the array is the only main data structure.
You can try by just filling enough data in an array and watch what is
happening.
Is the answer that Perl is not suitable to process great amount of data?
Thanks
------------------------------
Date: Wed, 11 Aug 1999 13:33:46 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Perl is eating up my memory
Message-Id: <linberg-1108991333460001@ltl1.literacy.upenn.edu>
In article <7os9or$2di@news.acns.nwu.edu>, "Chao Fang" <cfang@nwu.edu> wrote:
> Is the answer that Perl is not suitable to process great amount of data?
I'd say first that it sounds like your *machine* is not suitable for
processing great amounts of data. Drop a gig of RAM in it (and maybe an
extra processor or three while you're at it) and see how it goes then.
Second, I'd venture to suggest that there are better ways of holding 8M
(meaning 8,000,000?) one-digit numbers than just pumping them into an
array of scalars. See pack and unpack.
Finally, depending on what you want to do with those values, you might be
wasting Perl's power on them. C or assembly would be my suggestion if you
need to do lots of fast processing and thing aren't too complicated. But
I'd look at making sure your data structures and code are tight and
efficient first, then make sure your hardware is up to the task, before
descending into C or worse. :)
--
Steve Linberg, Systems Programmer &c.
National Center on Adult Literacy, University of Pennsylvania
Be kind. Remember, everyone you meet is fighting a hard battle.
print 'Just Another Perl ' . $perl_hierarchy[(USER+EXPERT)/2];
------------------------------
Date: 11 Aug 1999 13:06:11 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: reference to object method
Message-Id: <x7zozy8cxo.fsf@home.sysarch.com>
>>>>> "GB" == Greg Bacon <gbacon@itsc.uah.edu> writes:
GB> In article <7oqp8i$ioe$1@towncrier.cc.monash.edu.au>,
GB> damian@cs.monash.edu.au (Damian Conway) writes:
GB> : Note that you can also use symbolic references and write:
GB> :
GB> : my $ref = "Bar::FooOnYou";
GB> : $var->$ref("Howdy\n");
GB> :
GB> : But you didn't hear that from me ;-)
GB> my $foo = Foo->new;
GB> my $meth = "bar";
GB> $foo->$meth();
GB> I'm inclined to think of $obj->$var() as a dynamic method call, but
GB> maybe I'm just trying to define away the problem. :-)
that is not a true symbolic ref as a regular method call needs to be
searched for too. so all you are doing is providing a runtime value
vs. a compile time constant. perl still has to take the string and
search the class's (and its @ISA parent's) symbol tables for the method.
how come nobody (even damian, the OOP god) mentioned UNIVERSAL::can? it
will return a true ref to the method which you can then call it like
greg does.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 11 Aug 1999 17:44:24 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: reference to object method
Message-Id: <7oscpo$l20$2@info2.uah.edu>
In article <7oqph9$ij0$1@towncrier.cc.monash.edu.au>,
damian@cs.monash.edu.au (Damian Conway) writes:
: "David Christensen" <dchristensen@california.com> writes:
:
: >Approach #1 doesn't seem to work:
:
: Works under 5.005_02 or later.
: What version are you running?
This is in Changes5.004:
Title: "Allow $obj->$coderef()"
From: Chip Salzenberg <salzench@nielsenmedia.com>
Msg-ID: <199708291649.MAA23276@nielsenmedia.com>
Files: pp_hot.c
Greg
--
You've got to understand their market has always been the Windows space,
where you're actually doing people a favor by charging them money for things,
because that's the only way to keep from confusing them.
-- Larry Wall on ActiveState
------------------------------
Date: Wed, 11 Aug 1999 17:01:08 GMT
From: Salva <salvador@my-deja.com>
Subject: Re: Regexp newbie
Message-Id: <7osa8c$gdo$1@nnrp1.deja.com>
In article <37b19764.92335403@news.hydro.co.uk>,
gary@onegoodidea.com wrote:
> This is a nasty, brute force method. Can anyone think of a more
> elegant solution?
$string=~s/^(\s+)/$replace x length $1/e;
- Salvador.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 11 Aug 1999 17:14:00 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Regexp newbie
Message-Id: <7osb0o$pam$1@lublin.zrz.tu-berlin.de>
Gary O'Keefe <gary@onegoodidea.com> wrote in comp.lang.perl.misc:
>A keyboard was smashed into Gary O'Keefe's face and out came:
>
>[ Eric's stuff snipped - it was boring anyway ]
>
>>#!/usr/local/bin/perl -w
>>
>>use strict;
>>
>>my $string = ' - I am a luser.';
>>my $replace = 'Luser ';
>>
>>while ($string =~ /^ +/) {$string =~ s/( *) (\S*.*)/$1$replace$2/;}
> ^^
>should be
>
>while ($string =~ /^ +/) {$string =~ s/( *) ([^ ]*.*)/$1$replace$2/;}
>
>to be strictly correct with the problem definition.
>
>>print $string . "\n";
>
>This is a nasty, brute force method. Can anyone think of a more
>elegant solution?
s/^( +)/$string x length $1/e;
Anno
------------------------------
Date: Wed, 11 Aug 1999 17:02:50 GMT
From: @l@ <aqumsieh@matrox.com>
Subject: Re: Reset .. ie clear out a hash array
Message-Id: <7osabi$geq$1@nnrp1.deja.com>
In article <37B1A78F.DBBB4A33@btinternet.com>,
Nick Djurovich <Nick.Djurovich@btinternet.com> wrote:
> How can I reset %data to remove any data ? (both keys and values)
> without cycling through *all* the elements.
undef %hash;
or
%hash = ();
You might also want to have a look at perlfaq4 which discusses this and
similar issues.
HTH,
--Ala
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 11 Aug 1999 17:40:09 GMT
From: @l@ <aqumsieh@matrox.com>
Subject: Re: Reset .. ie clear out a hash array
Message-Id: <7oschn$ibc$1@nnrp1.deja.com>
In article <37B1A78F.DBBB4A33@btinternet.com>,
Nick Djurovich <Nick.Djurovich@btinternet.com> wrote:
> How can I reset %data to remove any data ? (both keys and values)
> without cycling through *all* the elements.
undef %hash;
or
%hash = ();
You might also want to have a look at perlfaq4 which discusses this and
similar issues.
HTH,
--Ala
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 11 Aug 1999 13:06:01 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: s/// and interpolation
Message-Id: <linberg-1108991306010001@ltl1.literacy.upenn.edu>
In article <7os8ks$f15$1@nnrp1.deja.com>, Christopher Conway
<chris_conway@my-deja.com> wrote:
> how do I force Perl to
> interpolate recursively one level down?
Does perlfaq4, "How can I expand variables in text strings?", shed any
light on your situation?
--
Steve Linberg, Systems Programmer &c.
National Center on Adult Literacy, University of Pennsylvania
print 'Just Another Perl ' . $perl_hierarchy[(USER+EXPERT)/2];
------------------------------
Date: Wed, 11 Aug 1999 12:57:32 -0400
From: Joe Kline <Joe.Kline@sdrc.com>
Subject: Re: searching complex data structure
Message-Id: <37B1AB7B.D06778B6@sdrc.com>
<<Courtesy email CC'd to Uri and David>>
Uri,
thanks for the tips. I was worried about autovivification and wasn't quite sure
how to side step it.
This were the efficiencies I was looking for, but wasn't seeing (staring at the
code too long/not enough sleep ).
I would also like to thank David Alan Black for his help as well.
Thanks again,
joe
--
/===================================================\
| Joe Kline | I used to be |
| E-Mail: Joe.Kline@sdrc.com | anonymous |
\===================================================/
------------------------------
Date: Tue, 10 Aug 1999 17:57:05 GMT
From: chrisl@tourneyland.com (Chris)
Subject: Testing
Message-Id: <37b067eb.5659121@news.swbell.net>
---
------------------------------
Date: Wed, 11 Aug 1999 10:12:37 -0700
From: "Ashish Bhargava" <abhargav@rational.com>
Subject: Re: Time:: Hires
Message-Id: <7osauf$pie$1@usenet.rational.com>
After checking the docs for select(), I see that it is used for selecting
filehandle. How would I use this for time measurements?
Please let me know.
Thanks,
Ashish
Graham Ashton <billynospam@mirror.bt.co.uk> wrote in message
news:slrn7r1ncc.53j.billynospam@wing.mirror.bt.co.uk...
> In article <7oql79$a12$1@usenet.rational.com>, Ashish Bhargava wrote:
>
> >One way is to use HiRes module. I am having problems installing this
> >module.
>
> afraid I've not tried it (well not on NT anyway).
>
> try reading the docs for select() instead. it might do enough for you to
> be able to avoid Time::Hires altogether.
>
> --
> Graham
>
> P.S. <billynospam@mirror.bt.co.uk> is a fully working address...
------------------------------
Date: 11 Aug 1999 15:08:13 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: turn $6 into $6000
Message-Id: <slrn7r34j0.dc3.fl_aggie@thepentagon.com>
On Wed, 11 Aug 1999 07:49:23 -0700, Larry Rosler <lr@hpl.hp.com>, in
<MPG.121b2d413991c4ca989e30@nntp.hpl.hp.com> wrote:
+ But that solution is only O(N). Surely you can do worse.
Worse? sure.
perl -e '$bucks=0; foreach (0..5999) { $bucks+=1;} print "\$$bucks\n";'
If I'm remembering things correctly, there's the time/space required to
generate a list of (0..5999), of course looping iteratively just to add
a constant isn't particularly efficient. No, just like the subject, this
is a terrible way to get to $6000.
Somehow:
perl -e '$bucks=0; foreach (0..6000) { $bucks+=$_;} print "\$$bucks\n";'
has a much prettier result. But just as inefficient... ;)
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Wed, 11 Aug 1999 10:55:57 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Using Mail::Header and Mail::Internet
Message-Id: <Pine.GSO.4.10.9908111052490.7774-100000@user2.teleport.com>
On Mon, 9 Aug 1999, Doraemon wrote:
> Can someone please tell me the syntax of the Mail::Header and
> Mail::Internet.
If the documentation which comes with a module is insufficient, please let
the module's author know in what way it fails to meet your needs.
> I have assigned values to these variables as follow:
> my $_from_address_ = "From: Doraemon@japan.co.jp"'
> my $_to_address_ = "Someone@somewhere.com"'
Those are odd variable names. Don't you mean to use semicolons where you
have single quotes? Doesn't perl complain that you're not backwhacking the
at-sign inside the double quotes? I don't feel like reading the rest of
your message, since you've gotten so much wrong in so little code. :-)
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 11 Aug 1999 17:01:29 GMT
From: as646@FreeNet.Carleton.CA (John Robson)
Subject: What's ePerl ?
Message-Id: <7osa99$qpu@freenet-news.carleton.ca>
Can someone tell me what is ePerl ? I went to the ePerl site, and from
what I gather, it's an embedded server-side scripting language for dynamic Web
page programming.
Is ePerl like PHP ? I don't see many examples of sites designed with
ePerl. What's your experience with ePerl like ?
------------------------------
Date: Wed, 11 Aug 1999 13:28:46 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: What's ePerl ?
Message-Id: <linberg-1108991328460001@ltl1.literacy.upenn.edu>
In article <7osa99$qpu@freenet-news.carleton.ca>,
as646@FreeNet.Carleton.CA (John Robson) wrote:
> Is ePerl like PHP ? I don't see many examples of sites designed with
> ePerl. What's your experience with ePerl like ?
I build LiteracyLink for PBS with ePerl. It's one way to embed Perl in
web pages. embPerl is very popular too, probably more widely used, and in
more active support.
Apache::ePerl embeds a Perl interpreter in Apache, and the execution is
very fast. I use it for database interaction (with Apache::DBI, which
shares and maintains a single DBI connection over multiple children).
Other than not (so far) being able to wrestle back control of errors from
its error-page generator, I've found it very satisfactory.
--
Steve Linberg, Systems Programmer &c.
National Center on Adult Literacy, University of Pennsylvania
Be kind. Remember, everyone you meet is fighting a hard battle.
print 'Just Another Perl ' . $perl_hierarchy[(USER+EXPERT)/2];
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 V9 Issue 463
*************************************