[12586] in Perl-Users-Digest
Perl-Users Digest, Issue: 6186 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 1 02:07:23 1999
Date: Wed, 30 Jun 99 23:00:20 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 30 Jun 1999 Volume: 8 Number: 6186
Today's topics:
Re: "push" 2 dim array (Tad McClellan)
Re: 2 simple (not to me tho) questions (Tad McClellan)
Re: 2 simple (not to me tho) questions <uri@sysarch.com>
Automate graphics conversion turnere0@my-deja.com
Re: bareface ratio <garyg@gator.net>
Re: Can not write my file to the server <dgris@moiraine.dimensional.com>
Re: Clueless and in need of help! (Michboy832)
Re: help (Tad McClellan)
Re: hiring perl programmers (Abigail)
Re: How to convert a text file to 0-byte lenght? (Abigail)
Re: Making things go "BEEP!" (Iain Chalmers)
Re: parsing for loop (Abigail)
Re: Perl or PNP...which is better? (Ook!)
Re: Please help! (Tad McClellan)
Re: q qq or qw (Abigail)
Re: random numbers ? (Abigail)
Re: Robot email/poster for this group (Abigail)
Re: Robot email/poster for this group (Abigail)
Re: Robot email/poster for this group (Tad McClellan)
Re: Robot email/poster for this group <dgris@moiraine.dimensional.com>
Re: Search Engine Problem -- newbie question (Abigail)
Re: Starting asynchronous process from Perl (Abigail)
Re: Starting asynchronous process from Perl <uri@sysarch.com>
Re: XML::Parser Objects Style problem <malone@eagle.larscom.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 30 Jun 1999 20:19:12 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: "push" 2 dim array
Message-Id: <06cel7.cb2.ln@magna.metronet.com>
kgentes@gentek.net wrote:
: I have read the Perldocs, tested this out,
: and several times searched the newsgroup
: for something to help..
Wonderful!
It is refreshing to see a posting from someone who was
brought up properly.
Kudos to your mother (or whoever)!
: I have a theorectical hash that would look
: like this,
: # empty the hash (TelProb record construction)
: %TelProbRec = (
[snip]
: ProbeMicro => [[],[],[],[]],
[snip]
: );
: I understand that I can use push to grow arrays
: without worrying about indexes. I use push
: in other areas a lot, but here I can't seem to
: nail down the right permutation of syntactical
: dressing to make it "see" that I am trying to grow
: my first "row" into the multi-dimensional array..
: # push @{$TelProbRec{ProbeMicro}}, [@fields [2..4]];
It would have been oh so much clearer if you had made
a complete Perl program that illustrates what you are
trying to do.
: to get around my mystification of the above not
: working
It works for me:
-----------------------
#!/usr/bin/perl -w
use strict;
my %TelProbRec;
my @evens = (2, 4, 6, 8, 10, 12);
my @odds = (1, 3, 5, 7, 9, 11);
push @{$TelProbRec{ProbeMicro}}, [ @evens[2..4] ];
push @{$TelProbRec{ProbeMicro}}, [ @odds[2..4] ];
print "@{$TelProbRec{ProbeMicro}[0]}\n";
print "@{$TelProbRec{ProbeMicro}[1]}\n";
-----------------------
output:
6 8 10
5 7 9
I don't see any problem there.
If you do, please try explaining it again (with real code
that "doesn't work")
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 30 Jun 1999 19:36:56 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: 2 simple (not to me tho) questions
Message-Id: <om9el7.cb2.ln@magna.metronet.com>
Bart Lateur (bart.lateur@skynet.be) wrote:
: Tad McClellan wrote:
: >: print("$foo");
: >: Looks better to me than
: >: print $foo;
: >
: >: It is ASTHETICS, nothing more.
: >
: > It is NOT asthetics, it is *semantics*, nothing more.
: Aren't you exagerating?
No.
: Say the demands change, you want an extra
: newline at the end. What would you do?
: print $foo."\n";
: or
: print "$foo\n";
: I bet that often, the choice will be the latter one.
Yes (but it would be "always", not "often")
: The only resulting
: effect is adding a newline, but yet, suddenly you accept putting the
: variable between quotes.
Because I need one of the two things that double quotes
is asking for (variable interpolation and/or backslash escapes).
print "$foo" is asking for them when they are not being used.
If you need those things, ask for them with double quotes.
If you don't, then don't.
It is a code maintenance issue.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 01 Jul 1999 01:31:04 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: 2 simple (not to me tho) questions
Message-Id: <x7oghx3pif.fsf@home.sysarch.com>
>>>>> "SL" == Steve Lamb <morpheus@despair.rpglink.com> writes:
SL> Because I was being polite and offering a solition to
SL> someone's problem.
but it wasn't a good solution so what use is it? if you like some absurd
idiom then keep it to yourself. don't try to infect others with
it. quoting a single variable is deemed bad code by the majority of perl
hackers. go against the tide if you will. it is your choice but don't
showcase it here.
SL> Actually, no. I don't give a shit who it was. He came off
SL> like a snob, blantently ignored what I said and then went on his
SL> own little personal crusade. It could have been Tom or
SL> Billy-Bo-Bob from Beumont.
well, go hang out in alt.perl then. he may come off sometimes in a less
than polite way, but he has contributed far more to the perl community
than you could ever do in multiple generations. so his word has a trifle
more weight here (and elsewhere). so defending your silly style is
pointless here especially with your shouting, cursing, and otherwise
childish ways.
>> clearness of intent is a major criterion and quoting a single vars
>> is not clear.
SL> In your opinion.
but i get paid for that opinion. and i get asked for my opinion. and my
opinion has garnered some respect in the perl world. has your opinion
ever been even acknowledged by anyone other than the burger clerk asking
you if you want fries with that?
>> period. you lose. you have to get out of the pool now.
SL> Sorry, I don't get out for other people's opinions, esp. when
SL> they don't read the entire thread and would know the answers to
SL> half the questions posed if they did.
i have followed this dismal thread and i have been amazed at your
pigheadedness. but that attitude exists in the world and you are cursed
to have it. enjoy it for it will get you nowhere.
>> well, if i used kill files i would plonk you too. instead i may peruse
>> some of your dribble and chortle at how stupid you are. oh, well. i have
>> to get my jollies somehow.
SL> Feel free, makes me all warm in fuzzy inside knowing there are
SL> self-ritious pricks like you in the world that hate me. Ooooo,
SL> scared me, you did.
i didn't intend to scare you. in fact, you scare me. knowing that
kiddies like you are programming in the world makes me scared. please
keep your work confined to your household pc. don't let someone's life
or livelihood depend on it. then you will be doing humanity the greatest
service possible.
SL> Making readable code, legable code, is also a major criterion.
SL> The examples I posted above, that you snipped, were simplified but
SL> showed exactly why I double quote on a print unless there is a
SL> good reason not to. It makes it consistent with the rest of my
SL> prints. To me, that *IS* "clearness of intent."
i didn't snip anything but some redundancy (foo vs bar does not make
more examples). my comments were on target for both the quoted code and
the snipped lines.
SL> So, go back to writing your obviously illegible code as is
SL> your wont and I'll continue writing code that I find quite legible
SL> as do all of my coworkers.
well, i have seen shops where someone who doesn't know perl tries to
learn it and then spreads their misinformation on how to program in it
to their cow-orkers. the infection spreads as fast as the latest u$hit
virus. so you have only your cow-orkers to judge your work and they may
be ill-suited to do so if they learned from you (or from a shared but
poor source like matt wright).
i have spent too many days cleaning up after the likes of you. such
people get so caught up in some little detail of how they do something
that any criticism of it is taken to be a full frontal assault on their
being. you bring it upon yourself, the paranoia, anger, mistrust, etc of
anyone whom you perceive knows more than you. try some humility and learn
from your more experienced brethren instead of striking at them before
you get hurt.
oh, well, i tried to make some sense to you but you will keep living in
your delusional world. if you want to, try another language where you
don't have to think so much and really understand the decisions you
make. like VB.
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
------------------------------
Date: Thu, 01 Jul 1999 05:05:49 GMT
From: turnere0@my-deja.com
Subject: Automate graphics conversion
Message-Id: <7lesv8$3rm$1@nnrp1.deja.com>
I'm looking for a way to automate conversion of
some images for a web site. I need to do the
following:
1. Convert from .tif to .gif
2. Resize each graphic to fit within certain
dimensions.
3. Modify the resolution of each image to bring
it within a certain file size (i.e. < 30k).
Are there any tools form modifying image files on
either Linux or NT that can be called/used from a
Perl (or... groan... VB) script to accomplish
this?
Thanks,
Eric Turner
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 01 Jul 1999 01:00:20 -0400
From: "Gary M. Greenberg" <garyg@gator.net>
Subject: Re: bareface ratio
Message-Id: <377AF5E4.D216E07E@gator.net>
Don Roby wrote:
>
[snip]
> Better approach:
>
> Q1: Can I use Y to do X?
> A1: No. Use Z instead.
> ...
> I'd rather see the fake answer as part of the original post, so it at
> least LOOKS like you've thought a bit yourself before posting. ;-)
>
Better still. Hold off on posting until the respondents submit their
corrections based on apriori knowledge of the problem you will have;
then simply test the solutions ;-}
maybe?
Gary
Putting out fire with gasoline
------------------------------
Date: 30 Jun 1999 23:27:07 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Can not write my file to the server
Message-Id: <m3u2rpos7o.fsf@moiraine.dimensional.com>
fmgst+@pitt.edu (Filip M. Gieszczykiewicz) writes:
> Speaking of robots to monitor this group - whenever anyone suggests
> "die" in a cgi-bin environment... NEVER just "die()" in a cgi-bin
> script - ANY output to STDOUT without the proper preamble will yield
> a Server Error 500 - which is incredibly uninformative.
<snip>
use CGI::Carp qw'fatalsToBrowser';
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: 01 Jul 1999 05:40:21 GMT
From: michboy832@aol.com (Michboy832)
Subject: Re: Clueless and in need of help!
Message-Id: <19990701014021.08641.00006995@ng-fa1.aol.com>
Which operating system do you use?
(email me back)
Steve Peters
Michboy832@aol.com
------------------------------
Date: Wed, 30 Jun 1999 19:26:39 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: help
Message-Id: <f39el7.cb2.ln@magna.metronet.com>
Gongya Yu (ygongya@garnet.acns.fsu.edu) wrote:
: Subject: help
Please put the subject of your post in the Subject of your post.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 1 Jul 1999 00:34:30 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: hiring perl programmers
Message-Id: <slrn7nlven.31h.abigail@alexandra.delanet.com>
Tom Christiansen (tchrist@mox.perl.com) wrote on MMCXXIX September
MCMXCIII in <URL:news:377a5462@cs.colorado.edu>:
--
-- Furthermore, they were told to pay especial attention to the space and
-- time complexities of their algorithms.
Nowadays, programmers that understand the words "space and time
complexity" seem to be rare. And most of them that don't have a lot
bigger paycheck than I have.
Abigail
--
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
${qq$\x5F$} = q 97265646f9 and s g..g;
qq e\x63\x68\x72\x20\x30\x78$&eggee;
{eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 1 Jul 1999 00:03:17 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: How to convert a text file to 0-byte lenght?
Message-Id: <slrn7nltk5.31h.abigail@alexandra.delanet.com>
zenin@bawdycaste.org (zenin@bawdycaste.org) wrote on MMCXXIX September
MCMXCIII in <URL:news:930727730.840085@thrush.omix.com>:
'' Abigail <abigail@delanet.com> wrote:
'' : Faisal Nasim (swiftkid@bigfoot.com) wrote on MMCXXVIII September MCMXCIII
'' : in <URL:news:7lc2s4$5if2@news.cyber.net.pk>:
'' >snip<
'' : ## But look, I shortened my sig, removed that separator, and I
'' : ## try to quote the message as less as possible! And also put
'' : ## reply after the quoted message.
'' :
'' : See! Even with Outlook you can do that.
''
'' Speeking of quoting issues, '## ' is not a normal quoting string and
'' thus newsreaders that have color coding features such as tin can't
'' detect such quoting correctly. I'd rather not add '#' to the
'' quoting charactor list for the same reasons I wouldn't want to add
'' '//' (it would catch code examples by mistake).
''
'' Please consider '> ' or ': ' as your quoting string, thanks. :-)
No. Fix your newsreader.
Abigail
--
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
for (s;s;s;s;s;s;s;s;s;s;s;s)
{s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Thu, 01 Jul 1999 15:05:50 +1000
From: bigiain@mightymedia.com.au (Iain Chalmers)
Subject: Re: Making things go "BEEP!"
Message-Id: <bigiain-0107991505500001@bigman.mighty.aust.com>
> How would one go about making a script produce an audible signal like the bell
> of a PC speaker. I have several needs for this. My most urgent is a small
> network monitoring script that I would like to put in CRON and when port X is
> not responding my server will produce an audible alert.
have you triedthis:
print chr(7);
I didn't really expect it to work on my mac under macperl, but it does!
Also works under mklinux too, the only other handy test machine i have.
big
------------------------------
Date: 1 Jul 1999 00:05:04 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: parsing for loop
Message-Id: <slrn7nltnh.31h.abigail@alexandra.delanet.com>
Bart Lateur (bart.lateur@skynet.be) wrote on MMCXXIX September MCMXCIII
in <URL:news:377bc886.2979241@news.skynet.be>:
.. Abigail wrote:
..
.. >Ah, the wonders of a real newsreader:
..
.. Now find a way to post this only once, you're set.
Even the best newsreaders can't detect newsservers that lie.
Abigail
--
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Wed, 30 Jun 1999 21:48:11 -0700
From: ookookook@yahoo.com (Ook!)
Subject: Re: Perl or PNP...which is better?
Message-Id: <ookookook-3006992148120001@ip185.r2.d.pdx.nwlink.com>
Um, did the poster mean "PHP"?
--
"Television: a medium. So called because it is neither rare nor well done."
- Ernie Kovacs
------------------------------
Date: Wed, 30 Jun 1999 19:31:44 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Please help!
Message-Id: <0d9el7.cb2.ln@magna.metronet.com>
Pierre-Luc Soucy (plsoucy@yahoo.com) wrote:
: we can't pay you in $$$.
: Note : we need your help
You are in the wrong newsgroup.
this is comp.lang.perl.misc, rec.humor is somewhere else.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 1 Jul 1999 00:39:57 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: q qq or qw
Message-Id: <slrn7nlvot.31h.abigail@alexandra.delanet.com>
Jeff Thies (cyberjeff@sprintmail.com) wrote on MMCXXX September MCMXCIII
in <URL:news:377AD62C.24BBEA9C@sprintmail.com>:
{} What is the difference between using:
{}
{} q{}
{} qq{}
{} qw{} ???
{}
{} I've seen them all used.
There are also qx{} and qr{}.
Which part of the manual didn't you understand?
Abigail
--
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")
-> define ("foldoc", "perl")) [0] -> print'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 1 Jul 1999 00:42:36 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: random numbers ?
Message-Id: <slrn7nlvtr.31h.abigail@alexandra.delanet.com>
Bart Lateur (bart.lateur@skynet.be) wrote on MMCXXIX September MCMXCIII
in <URL:news:377a1b49.244031@news.skynet.be>:
:: M.J.T. Guy wrote:
::
:: >>Let's do this:
:: >>
:: >> ## chose 6 draws of 47, non-replacing:
:: >> @deck = (1..47);
:: >> @draws = ();
:: >> for (1..6) {
:: >> push @draws, splice @deck, rand @deck, 1;
:: >> }
:: >
:: >That's an O(N**2) algorithm. There are well-known O(N) algorithms.
::
:: Why is it O(N**2)? Because splice is O(N)?
Yes. See FAQ. See cookbook.
:: I like the algorythm. You can make it O(N) (I hope) by doing the same
:: thing in another way:
::
:: for my $i (0..5) {
:: my $j = $i + int rand(@deck - $i);
:: @deck[$i,$j] = @deck[$j,$i]; # swap
:: }
:: @deck[0..5];
Yes. See FAQ. See cookbook. See Knuth.
Abigail (who has been battling against this quadratic algorithm for many
years, and still find it being suggested way to many times).
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 1 Jul 1999 00:17:39 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Robot email/poster for this group
Message-Id: <slrn7nluf1.31h.abigail@alexandra.delanet.com>
Marcel Grunauer (marcel.grunauer@lovely.net) wrote on MMCXXIX September
MCMXCIII in <URL:news:377af885.853997@enews.newsguy.com>:
<> On 29 Jun 1999 21:27:32 -0500, abigail@delanet.com (Abigail) wrote:
<>
<> >Marcel Grunauer (marcel.grunauer@lovely.net) wrote on MMCXXVIII September
<> >MCMXCIII in <URL:news:377b27a4.6551971@enews.newsguy.com>:
<>
<> >!! The moderated group doesn't really get much traffic, and by far the
<> >!! bulk of the discussion takes place here.
<> >
<> >Odd. I haven't read any discussion about it till today.
<>
<> I didn't mean discussion about this particular topic, I meant to say
<> that most of the postings to perl groups come to .misc.
Well, that's what the people in .moderated wanted, wasn't it? A low
traffic newsgroup to keep the ivory tower clean, that was the goal.
Or are they now feeling sad that noone wants to play with them anymore?
That happens if you build high fences.
<> >!! But a lot of the questions
<> >!! that get posted here (note the wording, does it sound a bit like a
<> >!! helpdesk?) *are* FAQs, and I can understand that people are getting
<> >!! tired of posting the same answers again and again. And again.
<> >
<> >And that's a problem for some *other* group, because of?
<>
<> Did I say that it was a problem for some other group?
.moderated deciding that .misc has a problem, yes, that very much looks
like one group having a problem with another. Or did I somehow miss the
unification of .moderated and .misc?
<> Anyway, the intent is not to increase noise in the group, but to
<> answer obvious FAQs and give helpful directions before someone else
<> has to post the usual replies.
Bots, being bots, *are* noise.
<> There are already some people who give helpful answers, and usually
<> pretty standard-like answers, to such posts. So the bot could do that.
Please. #perl was mentioned. Which is a classical example that shows that
bots do not work. They are great for some teenagers to feel important,
but rather annoying for real people.
<> If someone wanted to do something malicious, I'm sure they could have
<> made Eliza into an autoresponder by now. That is not the intent.
<>
<> But of course, if too many people in this group are against it, the
<> idea should probably be reconsidered.
Noone in this group ever suggested having a bot. I'd say that's more
than enough reason *not* to have one. Let the .moderated people post
in .moderated, and just forget about .misc if the traffic bothers them.
Or restructure some other group, alt.penguins for instance.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 1 Jul 1999 00:22:46 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Robot email/poster for this group
Message-Id: <slrn7nluon.31h.abigail@alexandra.delanet.com>
Ronald J Kimball (rjk@linguist.dartmouth.edu) wrote on MMCXXIX September
MCMXCIII in <URL:news:1du6pbw.i8zltj10kpcgqN@p79.tc2.metro.ma.tiac.com>:
**
** You're spreading the same FUD that John Stanley is. Please stop. The
** people who were discussing this project in .moderated are still active
** in .misc.
That makes it even more sillier.
The day bots appear in this group is the day I drop perl from my .newsrc file.
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Wed, 30 Jun 1999 19:41:24 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Robot email/poster for this group
Message-Id: <4v9el7.cb2.ln@magna.metronet.com>
Ronald J Kimball (rjk@linguist.dartmouth.edu) wrote:
: John Stanley <stanley@skyking.OCE.ORST.EDU> wrote:
: > Yeah, the gurus in the .moderated group helping us fools who still use
: > this group. No thanks.
: Stop spreading FUD.
But then he wouldn't get to make any postings...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 30 Jun 1999 23:56:08 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Robot email/poster for this group
Message-Id: <m3hfnoq5fr.fsf@moiraine.dimensional.com>
alastair@calliope.demon.co.uk (Alastair) writes:
> I think robots could interfere with the newsgroup if they
s/c(?=ould)/w/; # obperl
> It's a grey area.
No, it's not. Bots have no place in this newsgroup.
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: 1 Jul 1999 00:25:48 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Search Engine Problem -- newbie question
Message-Id: <slrn7nluud.31h.abigail@alexandra.delanet.com>
Dick Latshaw (latsharj@my-deja.com) wrote on MMCXXIX September MCMXCIII
in <URL:news:7ld2s1$cr9$1@nnrp1.deja.com>:
== In article <slrn7njfv2.1gv.abigail@alexandra.delanet.com>,
== abigail@delanet.com wrote:
== > ;; What's wrong? I'm getting only 10 hits and that's it.
== >
== > Ah yes. This is a task for the crystal ball. Please do sit down, this
== [Snip]
==
== Sheesh, Abi - all that and you forgot to tell him that it's an error at
== the end of line 17.
That would have costed him another 100 dollars. And I sensed an empty wallet.
Abigail
--
package Z;use overload'""'=>sub{$b++?Hacker:Another};
sub TIESCALAR{bless\my$y=>Z}sub FETCH{$a++?Perl:Just}
$,=$";my$x=tie+my$y=>Z;print$y,$x,$y,$x,"\n";#Abigail
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 1 Jul 1999 00:28:27 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Starting asynchronous process from Perl
Message-Id: <slrn7nlv3c.31h.abigail@alexandra.delanet.com>
Philip Weingart (pweingart@worldnet.att.net) wrote on MMCXXIX September
MCMXCIII in <URL:news:377A2A0D.8FA3D51D@worldnet.att.net>:
{}
{}
{} Abigail wrote:
{} >
{} > fork ()
{}
{} Resisting the temptation to pun obscenely...
{}
{} I've read about fork, and so far cannot see the usefulness of creating a copy
{} the existing process. It's another program I want to run, not the same one.
{} Clearly I'm missing something. Would you enlighten me concerning how this is
{} usually used?
unless (fork ()) {exec "something else"}
Abigail
--
sub A::TIESCALAR{bless\my$x=>A};package B;@q=qw/Hacker Another
Perl Just/;use overload'""'=>sub{pop @q};sub A::FETCH{bless\my
$y=>B}; tie my $shoe => 'A';print "$shoe $shoe $shoe $shoe\n";
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 01 Jul 1999 01:39:28 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Starting asynchronous process from Perl
Message-Id: <x7lnd13p4f.fsf@home.sysarch.com>
>>>>> "A" == Abigail <abigail@delanet.com> writes:
A> unless (fork ()) {exec "something else"}
ok if i start a round of perl golf? (i like that term. BTW i know larry
rosler is out for the week seeing shakespeare so he won't play with us).
fork || exec "blah" ;
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
------------------------------
Date: 30 Jun 1999 21:55:25 -0700
From: Ken Malone <malone@eagle.larscom.com>
Subject: Re: XML::Parser Objects Style problem
Message-Id: <so79ge9u.fsf@eagle.larscom.com>
Matt Sergeant writes:
>
> Ken Malone wrote:
> >
> > my $str = "<address><street>Elm</street></address>";
> > my $po = new XML::Parser(Style =>'Objects',Pkg =>'myObj');
> > my $obj = $po->parse($str);
> > print keys %$obj,"\n";
> > print $obj->[0],"\n";
> >
> > the printed values are "Kids" and "myObj::address=HASH(0xc7a14)" respectively.
> > Everything else I try to print returns errors. I've read the docs and still
> > can't figure out how to access the hashed XML elements. Please help.
>
> ... you get an instance of
> a myObj::address object at the root of the tree, with a property Kids
> which is an anon array containing an instance of a myObj::street object.
> That object will have a property Kids which is an anon array containing
> an instance of a myObj::Characters object.
>
> The Objects style is a nice experiment, but of very little real world
> use.
>
Thanks for the response. Yes, I can see the "Objects" style is a bit
cumbersome. What I'm looking for is something like the "Tree" style that leans
a bit more towards hash arrays. In the XML::Parser doc is says the "Tree"
style returns the XML block
<foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
as
{foo=>[{},
head=>[{id=>"a"
},
"Hello ",
em=>[{},
"there"
]
],
bar=>[{},
"Howdy",
ref=>[{}]
],
"do"
]
}
I would like to find a way to parse the above block as
$htree =
{foo=>[{},
{'head'=>[{id=>"a"},
"Hello ",
{em=>[{},
"there"
]
}
]
},
{'bar'=>[{},
"Howdy",
{ref=>[{}]
}
]
},
"do"
]
};
such that
keys %$htree is foo
"my $foo = $htree->{'foo'}"
keys %{$foo->[1]} is head
keys %{$foo->[1]{'head'}[0]} is id
$foo->[1]{'head'}[0]{'id'} is a
$foo->[1]{'head'}[1] is Hello
keys %{$foo->[1]{'head'}[2]} is em
$foo->[1]{'head'}[2]{'em'}[1] is there
keys %{$foo->[2]} is bar
$foo->[2]{'bar'}[1] is Howdy
keys %{$foo->[2]{'bar'}[2]} is ref
$foo->[3] is do
It seems to me that would be a semi-intuitive yet compact and perlish way of
handling small to medium sized XML blocks. Specifically I'd like to feed
arrays of elements to CGI.pm functions. Any ideas ?
Ken Malone
maloneSHIFT-2larscom.com
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 6186
**************************************