[24762] in Perl-Users-Digest
Perl-Users Digest, Issue: 6915 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 26 14:06:17 2004
Date: Thu, 26 Aug 2004 11:05:10 -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 Thu, 26 Aug 2004 Volume: 10 Number: 6915
Today's topics:
Re: Can I modify scalars contained in the array ref ret (Aaron Anodide)
Re: Can this code be better? (krakle)
Re: creating anonymous subroutines at runtime (Randal L. Schwartz)
email handling (Marcus)
get variables from another file <PerlGuRu2b@bobotheclown.org>
Re: get variables from another file <noreply@gunnar.cc>
Re: get variables from another file <mritty@gmail.com>
Re: get variables from another file <PerlGuRu2b@bobotheclown.org>
Re: get variables from another file <PerlGuRu2b@bobotheclown.org>
Re: get variables from another file <nobull@mail.com>
Re: I Broke a scalar <thundergnat@hotmail.com>
Re: Larry Wall & Cults <markus_wankusGETRIDOFALLCAPS@hotmail.com>
Re: Larry Wall & Cults <rynt@9yahoo.com>
Re: Larry Wall & Cults <ajsiegel@optonline.com>
Re: Larry Wall & Cults <stefsmurf@hotmail.com>
Re: Larry Wall & Cults <grante@visi.com>
Re: Larry Wall & Cults <albalmer@att.net>
Re: Larry Wall & Cults (John Savard)
Re: Larry Wall & Cults (Randal L. Schwartz)
Re: Larry Wall & Cults <grante@visi.com>
Re: Larry Wall & Cults <rich.teer@rite-group.com>
Re: matching chunks of data with a regular expression (Anno Siegel)
Re: need a good tutorial <aha1@gmx.net>
Re: Own module needs loaded module from main script ctcgag@hotmail.com
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 26 Aug 2004 08:22:23 -0700
From: anodide@hotmail.com (Aaron Anodide)
Subject: Re: Can I modify scalars contained in the array ref returned by DBI
Message-Id: <2db1147f.0408260722.223ea544@posting.google.com>
Brad Baxter <bmb@ginger.libs.uga.edu> wrote in message news:<Pine.A41.4.58.0408202123420.50500@ginger.libs.uga.edu>...
> On Fri, 20 Aug 2004, Aaron Anodide wrote:
>
> > John Bokma <postmaster@castleamber.com> wrote in message news:<Xns954AEF91080A8castleamber@130.133.1.4>...
> > >
> > > Also the > doesn't need to be escaped in many cases.
> > > <something> a > b </something> is valid.
> >
> > That's interesting, I didn't know it. I wonder if it's worth the
> > effort to analyze the context of the >'s though...
> >
>
> http://www.w3.org/TR/REC-xml/#syntax
>
> Regards,
>
> Brad
Thanks! So if I read this right, I still have to search my whole
document for >'s because of the rare case that it is in the string ]]>
and it's not a CDATA section.
Aaron
------------------------------
Date: 26 Aug 2004 11:03:47 -0700
From: krakle@visto.com (krakle)
Subject: Re: Can this code be better?
Message-Id: <237aaff8.0408261003.5693f9b6@posting.google.com>
Stop leaving a space before the semi-colon.
------------------------------
Date: 26 Aug 2004 08:52:30 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: creating anonymous subroutines at runtime
Message-Id: <86llg1rj5t.fsf@blue.stonehenge.com>
*** post for FREE via your newsreader at post.newsfeed.com ***
>>>>> "Anno" == Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> writes:
Anno> Why the string-eval?
Anno> my $cb = do { my $temp = $callback; sub { $temp->() } };
Anno> works just as well.
Ugh, I was thinking of the time when I was doing this to
optimize /$var/o stuff. That's how long ago it was.
Darn... that /o thing sure invites cargoculting!
print "Just another Perl hacker,"; # the original
--
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!
-----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----
------------------------------
Date: 26 Aug 2004 08:18:05 -0700
From: mygooglegroupsaccount@yahoo.com (Marcus)
Subject: email handling
Message-Id: <6fc26ca7.0408260718.16f5f550@posting.google.com>
Hi all
Im building a site that requires registration and assigns each user
with a username of their choice. Im using Perl and MySQL.
I want to achieve the following:
-Once an email is sent to [username]@mydomain.com (from anywhere), I
grab the text of that emails body and put it into the MySQL database
-This can then be retrieved by the user per usual through the sites
interface
It's a webmail app light if you will.
Any suggestions on what is needed for this, and/or if there are any
existing scripts available out there?
Thanks! M
------------------------------
Date: Thu, 26 Aug 2004 13:59:27 GMT
From: Rocky <PerlGuRu2b@bobotheclown.org>
Subject: get variables from another file
Message-Id: <pan.2004.08.26.13.52.50.870402@bobotheclown.org>
Hi. I wrote a script to monitor a tomcat error log.
http://www.bobotheclown.org/scripts/jakartalog
My boss wants to put all the recipients and hostnames in another file so
that we can change it per site.
here is what I tried
#!/usr/bin/perl
use strict;
use warnings;
use Net::SMTP;
require ('hello.pl');
my $hostname = $ENV{HOSTNAME};
my $jakartahome = $ENV{CATALINA_HOME};
my $logdir = "$jakartahome/logs";
hello.pl looks like this:
my $recipient1 = 'EMAIL1 HERE';
my $recipient2 = 'EMAIL2 HERE';
my $recipient3 = 'EMAIL3 HERE';
my $recipient4 = 'EMAIL4 HERE';
my $recipient5 = 'EMAIL5 HERE';
my $mailfrom = 'MAILFROM HERE';
my $fromaddress = "ISEETHEFROM HERE";
The problem is that the main script does not see the recipients from the
file. I am sure this is because of the way I have it scoped, but I know
no other way. Any pointers will be appreciated.
Rocky
------------------------------
Date: Thu, 26 Aug 2004 16:56:51 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: get variables from another file
Message-Id: <2p6cgpFhn7vrU1@uni-berlin.de>
Rocky wrote:
>
> my $recipient1 = 'EMAIL1 HERE';
> my $recipient2 = 'EMAIL2 HERE';
> my $recipient3 = 'EMAIL3 HERE';
> my $recipient4 = 'EMAIL4 HERE';
> my $recipient5 = 'EMAIL5 HERE';
> my $mailfrom = 'MAILFROM HERE';
> my $fromaddress = "ISEETHEFROM HERE";
>
> The problem is that the main script does not see the recipients
> from the file. I am sure this is because of the way I have it
> scoped, but I know no other way. Any pointers will be appreciated.
http://perl.plover.com/FAQs/Namespaces.html
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Thu, 26 Aug 2004 15:29:25 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: get variables from another file
Message-Id: <plnXc.11468$Nn2.10640@trndny05>
"Rocky" <PerlGuRu2b@bobotheclown.org> wrote in message
news:pan.2004.08.26.13.52.50.870402@bobotheclown.org...
> #!/usr/bin/perl
> use strict;
> use warnings;
> use Net::SMTP;
> require ('hello.pl');
> my $hostname = $ENV{HOSTNAME};
> my $jakartahome = $ENV{CATALINA_HOME};
> my $logdir = "$jakartahome/logs";
>
> hello.pl looks like this:
>
> my $recipient1 = 'EMAIL1 HERE';
> my $recipient2 = 'EMAIL2 HERE';
> my $recipient3 = 'EMAIL3 HERE';
> my $recipient4 = 'EMAIL4 HERE';
> my $recipient5 = 'EMAIL5 HERE';
> my $mailfrom = 'MAILFROM HERE';
> my $fromaddress = "ISEETHEFROM HERE";
>
> The problem is that the main script does not see the recipients from the
> file. I am sure this is because of the way I have it scoped, but I know
> no other way. Any pointers will be appreciated.
By definition, 'my' variables are block-scoped. If there is no explicit block
surrounding their declaration, the implicit block is the file itself.. They are
not visable outside of the file in which they are defined. You want to be using
package variables instead:
hello.pl:
our @recipients = qw/email1 email2 email3 email4 email5/;
our $mailfrom = 'MAILFROM';
our $fromaddress = 'FROMADDR';
main script:
#!/usr/bin/perl
use strict;
use warnings;
require 'hello.pl';
{
our (@recipients, $mailfrom, $fromaddress);
#do whatever you need with the varialbes
}
There are other variations on this solution too. Rather than the our
declaration in the main script, you could fully qualify each variable name (such
as @main::recipients ). If you don't want to mung the main:: namespace at all,
you could declare hello.pl to be in a new package, and then also declare that
package to be in effect in the block in which you use the variables. (As use
strict is still in effect, the our declaration is still necessary, however).
Finally, you could declare hello.pl to be in a new package, and skip the our
declaration in the main script by fully qualifying each variable with the new
package name whenever you use it.
Paul Lalli
------------------------------
Date: Thu, 26 Aug 2004 16:26:15 GMT
From: Rocky <PerlGuRu2b@bobotheclown.org>
Subject: Re: get variables from another file
Message-Id: <pan.2004.08.26.16.19.33.770497@bobotheclown.org>
On Thu, 26 Aug 2004 15:29:25 +0000, Paul Lalli wrote:
>
> "Rocky" <PerlGuRu2b@bobotheclown.org> wrote in message
> news:pan.2004.08.26.13.52.50.870402@bobotheclown.org...
>> #!/usr/bin/perl
>> use strict;
>> use warnings;
>> use Net::SMTP;
>> require ('hello.pl');
>> my $hostname = $ENV{HOSTNAME};
>> my $jakartahome = $ENV{CATALINA_HOME};
>> my $logdir = "$jakartahome/logs";
>>
>> hello.pl looks like this:
>>
>> my $recipient1 = 'EMAIL1 HERE';
>> my $recipient2 = 'EMAIL2 HERE';
>> my $recipient3 = 'EMAIL3 HERE';
>> my $recipient4 = 'EMAIL4 HERE';
>> my $recipient5 = 'EMAIL5 HERE';
>> my $mailfrom = 'MAILFROM HERE';
>> my $fromaddress = "ISEETHEFROM HERE";
>>
>> The problem is that the main script does not see the recipients from the
>> file. I am sure this is because of the way I have it scoped, but I know
>> no other way. Any pointers will be appreciated.
>
> By definition, 'my' variables are block-scoped. If there is no explicit block
> surrounding their declaration, the implicit block is the file itself.. They are
> not visable outside of the file in which they are defined. You want to be using
> package variables instead:
>
> hello.pl:
> our @recipients = qw/email1 email2 email3 email4 email5/;
> our $mailfrom = 'MAILFROM';
> our $fromaddress = 'FROMADDR';
>
> main script:
>
> #!/usr/bin/perl
> use strict;
> use warnings;
> require 'hello.pl';
> {
> our (@recipients, $mailfrom, $fromaddress);
> #do whatever you need with the varialbes
> }
>
> There are other variations on this solution too. Rather than the our
> declaration in the main script, you could fully qualify each variable name (such
> as @main::recipients ). If you don't want to mung the main:: namespace at all,
> you could declare hello.pl to be in a new package, and then also declare that
> package to be in effect in the block in which you use the variables. (As use
> strict is still in effect, the our declaration is still necessary, however).
> Finally, you could declare hello.pl to be in a new package, and skip the our
> declaration in the main script by fully qualifying each variable with the new
> package name whenever you use it.
>
> Paul Lalli
Thank you Mr. Lalli
------------------------------
Date: Thu, 26 Aug 2004 16:27:13 GMT
From: Rocky <PerlGuRu2b@bobotheclown.org>
Subject: Re: get variables from another file
Message-Id: <pan.2004.08.26.16.20.37.290566@bobotheclown.org>
On Thu, 26 Aug 2004 16:56:51 +0200, Gunnar Hjalmarsson wrote:
> Rocky wrote:
>>
>> my $recipient1 = 'EMAIL1 HERE';
>> my $recipient2 = 'EMAIL2 HERE';
>> my $recipient3 = 'EMAIL3 HERE';
>> my $recipient4 = 'EMAIL4 HERE';
>> my $recipient5 = 'EMAIL5 HERE';
>> my $mailfrom = 'MAILFROM HERE';
>> my $fromaddress = "ISEETHEFROM HERE";
>>
>> The problem is that the main script does not see the recipients
>> from the file. I am sure this is because of the way I have it
>> scoped, but I know no other way. Any pointers will be appreciated.
>
> http://perl.plover.com/FAQs/Namespaces.html
Thank you sir
------------------------------
Date: Thu, 26 Aug 2004 17:50:08 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: get variables from another file
Message-Id: <cgl444$khn$2@sun3.bham.ac.uk>
Paul Lalli wrote:
> There are other variations on this solution too. Rather than the our
> declaration in the main script, you could fully qualify each variable name (such
> as @main::recipients ). If you don't want to mung the main:: namespace at all,
> you could declare hello.pl to be in a new package, and then also declare that
> package to be in effect in the block in which you use the variables. (As use
> strict is still in effect, the our declaration is still necessary, however).
> Finally, you could declare hello.pl to be in a new package, and skip the our
> declaration in the main script by fully qualifying each variable with the new
> package name whenever you use it.
Another variation - convert your original script into a module and make
the config file into a script that uses that module.
------------------------------
Date: Thu, 26 Aug 2004 09:35:42 -0400
From: thundergnat <thundergnat@hotmail.com>
Subject: Re: I Broke a scalar
Message-Id: <412de729$0$19720$61fed72c@news.rcn.com>
no@no.invalid wrote:
> Can this be done? Should right? Well its not working =(
> What's goin on?
Wow. That's a hell of a scalar.
You're either going to have to escape all of the single quote inside the
scalar, (ugh) or, a much better idea, use q/ / quoting. See below.
(The more interesting question is WHY you want to have such a scalar...)
>
> my $a = '
my $a = q/
> $VAR1 = bless( {
> 'read_limit' => 3000,
> 'outbuffer' => '',
> 'write_limit' => 3000,
> 'index' => 0,
> 'inbuffer' => '',
> 'handle' => bless( \*Symbol::GEN1, 'IO::Socket::INET' ),
> 'writeonly' => undef,
> 'eof' => 0,
> 'choker' => undef,
> 'choked' => 0,
> 'error' => 0,
> 'linemode' => 0,
> 'sset' => bless( {
> 'sessions' => {
>
> 'IO::Socket::INET=GLOB(0x1a4
> c120)' => $VAR1
> },
> 'listen_socket' => bless(
\*Symbol::GEN0, 'I
> O::Socket::INET' ),
> 'writers' => bless( [
> undef,
> 0
> ],
'IO::Select' ),
> 'readers' => bless( [
> '?',
> 2,
> undef,
> undef,
> undef,
>
> $VAR1->{'sset'}{'liste
> n_socket'},
>
$VAR1->{'handle'}
> ], 'IO::Select' )
> }, 'IO::LineBufferedSet' )
> }, 'IO::LineBufferedSessionData' );
> $VAR1 = undef;
> ';
/;
> print $a;
------------------------------
Date: Thu, 26 Aug 2004 08:53:58 -0400
From: Markus Wankus <markus_wankusGETRIDOFALLCAPS@hotmail.com>
Subject: Re: Larry Wall & Cults
Message-Id: <Q3lXc.22457$_H5.654259@news20.bellglobal.com>
>>I think you're getting confused with the Blue Öyster Cult.
>>Don't Fear the Reaper - great song.
>
>
It was a great song, but it needed more cowbell...
Mark.
------------------------------
Date: Thu, 26 Aug 2004 07:07:43 -0700
From: "R Baumann" <rynt@9yahoo.com>
Subject: Re: Larry Wall & Cults
Message-Id: <HvadnUsZ7IAwc7DcRVn-sQ@megapath.net>
"Xah Lee" <xah@xahlee.org> wrote in message
news:7fe97cc4.0408251356.34f2102a@posting.google.com...
> Larry Wall and Cults
> (Lazyness, Impatience and Hubris)
> 200012
>
<BIG SNIP>
In this context --- This is the STUPIDEST thing I've ever heard. What a
maroon! What a Trollup!
RB
------------------------------
Date: Thu, 26 Aug 2004 14:24:24 GMT
From: Arthur <ajsiegel@optonline.com>
Subject: Re: Larry Wall & Cults
Message-Id: <ufsri01jsj8qnk468mrohbhivaq2fsaoab@4ax.com>
On Thu, 26 Aug 2004 07:07:43 -0700, "R Baumann" <rynt@9yahoo.com>
wrote:
>
>"Xah Lee" <xah@xahlee.org> wrote in message
>news:7fe97cc4.0408251356.34f2102a@posting.google.com...
>> Larry Wall and Cults
>> (Lazyness, Impatience and Hubris)
>> 200012
>>
><BIG SNIP>
>
>In this context --- This is the STUPIDEST thing I've ever heard. What a
>maroon! What a Trollup!
>
His plane curve work is not far from some of my own obsessions. I knew
of and admired his site.
Didn't know he had other interests as well ;)
Maybe an extreme me.
All obsessions in moderation, is my motto.
Art
>RB
>
------------------------------
Date: Thu, 26 Aug 2004 14:24:33 GMT
From: "Johnny Storm" <stefsmurf@hotmail.com>
Subject: Re: Larry Wall & Cults
Message-Id: <BomXc.319839$%_6.148588@attbi_s01>
"Markus Wankus" <markus_wankusGETRIDOFALLCAPS@hotmail.com> wrote in message
news:Q3lXc.22457$_H5.654259@news20.bellglobal.com...
> >>I think you're getting confused with the Blue Öyster Cult.
> >>Don't Fear the Reaper - great song.
> >
> >
>
> It was a great song, but it needed more cowbell...
>
> Mark.
Gotta have more cowbell. . . .
Johnny
------------------------------
Date: 26 Aug 2004 15:05:00 GMT
From: Grant Edwards <grante@visi.com>
Subject: Re: Larry Wall & Cults
Message-Id: <412dfc1c$0$65599$a1866201@newsreader.visi.com>
On 2004-08-26, Sara <genericax@hotmail.com> wrote:
> Hey this ain't no CULT! Our creedo is simply:
>
> "Larry said it, I believe it, THAT settles it!"
>
> If you don't believe it just look at the reaction if any questions any
> element of Perl design!
Over here in c.l.python, it's more like
"Guido said it, that settles it, but we're going to discuss
it endlessly and and vote on it using six or seven
different voting algorithms anyway. Then we'll argue about
the voting algorithms."
--
Grant Edwards grante Yow! I'm ZIPPY!! Are we
at having FUN yet??
visi.com
------------------------------
Date: Thu, 26 Aug 2004 08:58:00 -0700
From: Alan Balmer <albalmer@att.net>
Subject: Re: Larry Wall & Cults
Message-Id: <j22si0d0dic5cjnmffvdr5stjmtf5qvn0m@4ax.com>
On 25 Aug 2004 23:57:24 -0700, spam_depository2004@yahoo.com (Johnny)
wrote:
>xah@xahlee.org (Xah Lee) wrote in message news:<7fe97cc4.0408251356.34f2102a@posting.google.com>...
>
>> How can we prevent heinous cults then? Stop bending truths. Education
>> and rationalism. I'm starting my own cult to exterminate morons on
>> this earth. Two things are on the top of my agenda: Unixism and Perl.
>
>I bet Larry Wall's life insurance premiums just skyrocketed. BTW, what
>does this have to do with Lisp? We are more of a therapy and support
>group than a cult.
That's fortunate, since Xah Lee obviously needs those services.
--
Al Balmer
Balmer Consulting
removebalmerconsultingthis@att.net
------------------------------
Date: Thu, 26 Aug 2004 16:16:25 GMT
From: jsavard@excxn.aNOSPAMb.cdn.invalid (John Savard)
Subject: Re: Larry Wall & Cults
Message-Id: <412e0b7b.7894449@news.ecn.ab.ca>
On 25 Aug 2004 14:56:06 -0700, xah@xahlee.org (Xah Lee) wrote, in part:
>Did you know that throughout history there's this thing called cult?
We have heard of it.
>Don't think that i'm citing from
>some arcane books buried in libraries. These are real, and not
>difficult to find in real life.
Unlike the cult of Chthulhu, for example.
>Big brother organizations, such as the FBI, is keen on these and
>very interested in benefiting from social psychology themselves. They
>are recorded in books too. Ever wonder why the library houses so many
>cold volumes of paper? This is one contributing reason. You might be
>interested to verify that sometimes.
Ah, yes. If it weren't for the interest of the FBI in cults, our
libraries would be much smaller, or they would emphasize warm audio and
video recordings more.
>Surely you have heard of Adolf Hitler
>and his atrocities of genocide?
Yes, you are rather safe in assuming that.
>I must alert you, that a single person
>couldn't commit such a crime. You see, even if you are superman, you
>can only kill few at a time.
Yes, despite claims at the Nuremberg trials, Hitler didn't run the
concentration camps as a one-man operation.
>You see, it is the people, people like
>you and me, who commit the killings willingly, by Hitler's
>teaching. You may say: "no, i won't ever do such stupid thing", well
>because you are very ignorant about social psychology. It is precisely
>innocent people like you and (not) me, who were lead by the radical
>leaders of supreme brain-washing abilities. The innocent mob were
>fervent in their leader's vision and beliefs to commit anything.
They did, though, have to select from the German people those who would
operate the concentration camps.
As for the masses, it was enough that they were afraid to try to do
anything to stop it.
>How can we prevent heinous cults then? Stop bending truths. Education
>and rationalism. I'm starting my own cult to exterminate morons on
>this earth. Two things are on the top of my agenda: Unixism and Perl.
You are not providing any validation for your claim that these things
are so dangerous that the use of deadly force is justified or necessary.
John Savard
http://home.ecn.ab.ca/~jsavard/index.html
------------------------------
Date: 26 Aug 2004 08:57:51 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Larry Wall & Cults
Message-Id: <86hdqpriww.fsf@blue.stonehenge.com>
*** post for FREE via your newsreader at post.newsfeed.com ***
>>>>> "Grant" == Grant Edwards <grante@visi.com> writes:
Grant> "Guido said it, that settles it, but we're going to discuss
Grant> it endlessly and and vote on it using six or seven
Grant> different voting algorithms anyway. Then we'll argue about
Grant> the voting algorithms."
Are the voting algorithms indented consistently? That's a necessity,
correct? Surely, they have significant whitespace.
/me ducks back under his rock
--
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!
-----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----
------------------------------
Date: 26 Aug 2004 17:10:54 GMT
From: Grant Edwards <grante@visi.com>
Subject: Re: Larry Wall & Cults
Message-Id: <412e199e$0$8076$a1866201@newsreader.visi.com>
On 2004-08-26, Randal L. Schwartz <merlyn@stonehenge.com> wrote:
> *** post for FREE via your newsreader at post.newsfeed.com ***
>
>>>>>> "Grant" == Grant Edwards <grante@visi.com> writes:
>
>Grant> "Guido said it, that settles it, but we're going to discuss
>Grant> it endlessly and and vote on it using six or seven
>Grant> different voting algorithms anyway. Then we'll argue about
>Grant> the voting algorithms."
>
> Are the voting algorithms indented consistently? That's a
> necessity, correct?
Of course, but are they consistently indented using tabs or
spaces?
> Surely, they have significant whitespace.
--
Grant Edwards grante Yow! Gee, I feel kind of
at LIGHT in the head now,
visi.com knowing I can't make my
satellite dish PAYMENTS!
------------------------------
Date: Thu, 26 Aug 2004 17:57:44 GMT
From: Rich Teer <rich.teer@rite-group.com>
Subject: Re: Larry Wall & Cults
Message-Id: <Pine.SOL.4.58.0408261056530.568@zaphod.rite-group.com>
On Thu, 26 Aug 2004, Tor Iver Wilhelmsen wrote:
> Rich Teer <rich.teer@rite-group.com> writes:
>
> > I think you're getting confused with the Blue Öyster Cult.
>
> Actually, there is also The Cult, a British band that lasted from
> 1984-1995.
I belive the Cult (She Sells Sanctuary, etc.) is another manfifestation
of the Blue Öyster Cult.
--
Rich Teer, SCNA, SCSA, author of "Solaris Systems Programming",
published in August 2004.
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
------------------------------
Date: 26 Aug 2004 13:26:38 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: matching chunks of data with a regular expression
Message-Id: <cgkoee$mdl$2@mamenchi.zrz.TU-Berlin.DE>
Leif Wessman <leifwessman@hotmail.com> wrote in comp.lang.perl.misc:
> Hi!
>
> I'm using LWP::Parallel to create several parallel requests. I would
> like to handle the result from each reqest as it come. So, I've
> registered a callback function to the user agent, like this:
>
> my $res = $ua->register($req, \&callback);
>
> In the callback function I would like to use a regular expression that
> matches 9 digits. This is what I have:
>
> sub callback {
> my($chunk,$response,$protocol) = @_;
> $chunk =~ /(\d{9})/;
> ...
> }
>
> What I wonder is what happens if I get a chunk that ends with "12345",
> and the next chunk starts with "6789". Will it get matched?
No.
> If not,
> how can I change my code so it matches "123456789" even if it's in two
> different chunks?
my $rest = '';
sub callback {
for ( $rest . shift ) {
print "$_\n" for /(\d{9})/g; # or whatever
( $rest) = /(\d*)$/;
}
}
Anno
------------------------------
Date: Thu, 26 Aug 2004 15:58:28 +0200
From: aha <aha1@gmx.net>
Subject: Re: need a good tutorial
Message-Id: <cgkqa5$3cf$1@sunu789.rz.ruhr-uni-bochum.de>
Robin wrote:
> I was looking for tutorials on google for writing perl modules
you might try this one: http://learn.perl.org/library/beginning_perl/
a.
------------------------------
Date: 26 Aug 2004 17:31:47 GMT
From: ctcgag@hotmail.com
Subject: Re: Own module needs loaded module from main script
Message-Id: <20040826133147.234$lP@newsreader.com>
bart@nijlen.com (Bart Van der Donck) wrote:
> Hello,
>
> My main program calls this module:
>
> use DBI;
>
> Then it calls another module (one of myself), using this code:
>
> use lib '/path/to/my/module/';
> use NameOfMyModule;
>
> Inside NameOfModule.pm, I want to execute commands that need the
> previously loaded DBI.pm. However it fails, saying that DBI.pm isn't
> loaded.
What, exactly, fails and says that? If you only use DBI in an OO way,
you should not have a problem. If you don't use DBI in an OO way, you
should start.
> Which could be solved quickly by invoking DBI.pm again from
> within NameOfModule.pm.
>
> This works fine. But the waste of memory is considerable because I
> have tens of own modules like NameOfMyModule that are invoked from the
> main program. Most of them need DBI.
I wouldn't worry about the memory wasted (it would only be the neglible
amount of memory needed to import variables), but if each module is opening
its own connection to the database, that is potentially wasteful (and
buggy).
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 6915
***************************************