[12583] in Perl-Users-Digest
Perl-Users Digest, Issue: 6183 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 30 20:07:17 1999
Date: Wed, 30 Jun 99 17:00:19 -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: 6183
Today's topics:
Re: 2 simple (not to me tho) questions (Steve Lamb)
Re: 2 simple (not to me tho) questions <tchrist@mox.perl.com>
Re: 2 simple (not to me tho) questions (Steve Lamb)
Re: Apples and Oranges (Tad McClellan)
Re: Apples and Oranges (Andrew Allen)
COntrolling Color and font in a Excel Spread Sheet <msingla@ford.com>
Re: Cross Reference Listing of Perl Script (Tad McClellan)
Re: Cross Reference Listing of Perl Script jtubaugh@my-deja.com
Re: Extracting specific text from specific files in a l (Tad McClellan)
Re: How to remove the x number of lines from top of a f (Tad McClellan)
Re: Indexing (Tad McClellan)
Re: infobot for c.l.p.m (John Stanley)
Re: inplace edit (Todd Tolhurst)
Re: inplace edit (Tad McClellan)
Re: Modules on Win32 <hiller@email.com>
Re: Perl in Web Server (Tad McClellan)
Re: Perl or PNP...which is better? (Tad McClellan)
Re: Perl without Web-Server (Tad McClellan)
Problem with cgi script and reading data... <rccrews@infi.net>
Re: Robot email/poster for this group (John Stanley)
Re: strange regex behaviour - don't understand what's g (Tad McClellan)
Re: strange regex behaviour - don't understand what's g <rick.delaney@home.com>
Re: system() and exit status (Tad McClellan)
Re: UK Perl job vacancy <cassell@mail.cor.epa.gov>
Re: why doesn't this for loop work <vinger@mail.ford.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 30 Jun 1999 22:01:36 GMT
From: morpheus@despair.rpglink.com (Steve Lamb)
Subject: Re: 2 simple (not to me tho) questions
Message-Id: <slrn7nl4u0.9bs.morpheus@rpglink.com>
On 30 Jun 1999 13:47:35 -0700, Tom Christiansen <tchrist@mox.perl.com> wrote:
>It's quite simply a misleading thing to write fn("$x") in lieu of fn($x).
>It makes you wonder, "What the devil are they stringifying this before
>passing it in to the function for?" It's not just a bad idea. It's
>a FAQ. The next release will see more detail.
Is it really misleading? Considering this whole damned threat is because
you decided to be holier-than-thou about how one person handles a *PRINT
STATEMENT*. You dropped the line where I said it was only for prints, then
made it include all functions when I CLEARLY stated that was not the case.
Page 10, read it, again, until you figure it out.
--
Steve C. Lamb | I'm your priest, I'm your shrink, I'm your
ICQ: 5107343 | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------
------------------------------
Date: 30 Jun 1999 16:21:58 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: 2 simple (not to me tho) questions
Message-Id: <377a9886@cs.colorado.edu>
A whingeing wanker wastefully wrote:
: Is it really misleading? Considering this whole damned threat is because
:you decided to be holier-than-thou about how one person handles a *PRINT
:STATEMENT*. You dropped the line where I said it was only for prints, then
:made it include all functions when I CLEARLY stated that was not the case.
You appear to be unable to express yourself without exploding in
vulgarities and profanity. I understand that they can treat Tourette's
Syndrome these days. I suggest that you look into it.
: Page 10, read it, again, until you figure it out.
Do *not* tell me to read my own book, you petulant and puerile pustule.
Larry himself has made statements that "$x" is misleading when $x will do.
You know not whereof you speak. You're leading others into confusion
and deceipt.
*PLONK* for undue acrimony and amaritude.
--tom
--
May our nation continue to be the beakon of hope to the world.
--The Quayle's 1989 Christmas card.
[Not a beacon of literacy, though.]
------------------------------
Date: 30 Jun 1999 23:00:10 GMT
From: morpheus@despair.rpglink.com (Steve Lamb)
Subject: Re: 2 simple (not to me tho) questions
Message-Id: <slrn7nl8bp.9bs.morpheus@rpglink.com>
On 30 Jun 1999 16:21:58 -0700, Tom Christiansen <tchrist@mox.perl.com> wrote:
>You appear to be unable to express yourself without exploding in vulgarities
>and profanity. I understand that they can treat Tourette's Syndrome these
>days. I suggest that you look into it.
Sorry, that tends to happen when people can't get their nose out of the
air long enough to read and quote properly and, instead, reply just to read
their own gospel and spread their BS far in and wide in an attempt to feel
important.
>: Page 10, read it, again, until you figure it out.
>Do *not* tell me to read my own book, you petulant and puerile pustule.
Then read it until you figure it out.
>Larry himself has made statements that "$x" is misleading when $x will do.
Really.
print($foo);
print("$bar\n");
print($bar);
print("$foo\n");
or
print("$foo");
print("$bar\n");
print("$bar");
print("$foo\n");
Wow, george, it is consistancy! God, that is *SO* misleading. Wow, I
never saw that before. Geez, I mean, wow! Thank you *SO* much for pointing
that out to me.
>You know not whereof you speak. You're leading others into confusion
>and deceipt.
Let me be blunt about this, not that you ever read anything anyone else
actually writes, only what you think they write.
IT IS MY CODE, THAT IS WHAT *I* DO AND IN THAT INSTANCE IT PROVIDED NO
HARM. WHEN YOU CHALLENGED IT I POINTED OUT THE SPECIFIC CASES THAT I USED IT
UNDER. YOU, HOWEVER, DECIDED TO BE A PRICK ABOUT IT ("Look Maude, I have a
live one here!"), FAILED TO QUOTE THE RELEVENT PARTS OF MY POST AND THEN WENT
ON A COMPLETELY DIFFERENT TANGENT.
>*PLONK* for undue acrimony and amaritude.
Good, at least I won't have to put up with your snobbery and utter lack of
respect for anyone else.
--
Steve C. Lamb | I'm your priest, I'm your shrink, I'm your
ICQ: 5107343 | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------
------------------------------
Date: Wed, 30 Jun 1999 13:29:41 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Apples and Oranges
Message-Id: <56kdl7.e02.ln@magna.metronet.com>
William Herrera (posting.account@lynxview.com) wrote:
: On Tue, 29 Jun 1999 13:25:41 -0400, Ala Qumsieh <aqumsieh@matrox.com>
: wrote:
: >No .. it's not a bug .. but you are using symbolic references, which
: >are very confusing sometimes. In Perl's regexps, $1, $2, etc, are
: >special READONLY vars that are set to whatever is matched by their
: >respective parentheses (see perlre for more info).
: >
: >When you use a string that starts with a number as a symbolic ref,
: >Perl thinks that you are trying to set one of those read-only vars,
: >and complains.
: Worse than that, it thinks it IS the $n variable It only looks at the
: leading number!
That's what perldata.pod says about variable names that start
with a digit:
"Strings that match parenthesized parts of a
regular expression are saved under names containing
only digits after the $"
^^^^^^^^^^^
: Look at this:
[ snip code. Only Silly People need to look at it because they
are the only ones who use symbolic references.
]
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 30 Jun 1999 23:28:43 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: Apples and Oranges
Message-Id: <7le97b$pj1$1@fcnews.fc.hp.com>
Tad McClellan (tadmc@metronet.com) wrote:
: That's what perldata.pod says about variable names that start
: with a digit:
: "Strings that match parenthesized parts of a
: regular expression are saved under names containing
: only digits after the $"
: ^^^^^^^^^^^
I'm confused. What part of your quoted text talks about variable names
that start with a digit? The text appears to talk about variable names
that contain only digits.
Andrew
------------------------------
Date: Tue, 29 Jun 1999 13:51:43 -0400
From: Manmohan Singla <msingla@ford.com>
Subject: COntrolling Color and font in a Excel Spread Sheet
Message-Id: <377907AF.8AC9D8DA@ford.com>
Hello,
I am dynamically populating a excel spreadsheet from web.using an oracle
database. I want to control some colors and fonts in the excel sheet
from Perl.Any Help?!!!!
Thanks
Manny
------------------------------
Date: Wed, 30 Jun 1999 14:31:21 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Cross Reference Listing of Perl Script
Message-Id: <ppndl7.a52.ln@magna.metronet.com>
jtubaugh@my-deja.com wrote:
: I seem to remember reading somewhere that there was a utility that would
: read a Perl script and create a cross-reference listing. By
: "cross-reference listing" I mean something that identifies the
: functions, and variables used in the script.
Perl FAQ, part 3:
"How do I cross-reference my Perl programs?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 30 Jun 1999 23:37:34 GMT
From: jtubaugh@my-deja.com
Subject: Re: Cross Reference Listing of Perl Script
Message-Id: <7le9nu$tmk$1@nnrp1.deja.com>
In article <377A7174.9DC7915A@email.com>,
Jordan Hiller <hiller@email.com> wrote:
> This is in the FAQ. No I'm not gonna go b!tching about that...
>
>
http://language.perl.com/newdocs/pod/perlfaq3.html#How_do_I_cross_refere
nce_my_Perl
>
> --
>
> How do I cross-reference my Perl programs?
>
> The B::Xref module, shipped with the new, alpha-release Perl compiler
(not the
> general distribution prior to the 5.005 release), can be used
> to generate cross-reference reports for Perl programs.
>
> perl -MO=Xref[,OPTIONS] scriptname.plx
>
My apologies for taking up space asking something that is in the FAQ. I
didn't remember. Of course we are only on 5.002 of Perl.
Thanks.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 30 Jun 1999 13:39:50 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Extracting specific text from specific files in a list
Message-Id: <6pkdl7.e02.ln@magna.metronet.com>
Keith Lee (leejk@cat.com) wrote:
: Yes, I have tried this and other different variations of this, but each time
: I get an error back saying:
: "Uncaught exception from user code: /^assembly(name="1322500.vdi/:
: unmatched () in regexp at ./vdimerge.cgi line 20, <FOO> chunk 1"
: I am new to writing pattern matches, and I have the feeling that this is a
: simple fix and when some of you point out what is wrong here, I am going to
: feel pretty stupid. Anybody?
perldoc -f quotemeta
: $string = 'assembly (name="';
[snip]
: print FILE <FOO> if /^$string$file/ ... eof;
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 30 Jun 1999 13:55:59 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to remove the x number of lines from top of a file
Message-Id: <fnldl7.e02.ln@magna.metronet.com>
Dariush_news (dazimi@yahoo.com) wrote:
: How can I remove the x number of lines from top of a file.?
Perl FAQ, part 5:
"How do I change one line in a file/
delete a line in a file/
insert a line in the middle of a file/
append to the beginning of a file?"
: Can you suggest anything?
I would suggest that you check the Perl FAQ
before posting to the Perl newsgroup.
You might also want to look up the $. special variable
in perlvar.pod.
: Thank you.
Uh huh.
: Please forward ans to
: Dariush_Azimi@mta1.metrodesk.metrotor.on.ca
Ask it here, get the answer here.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 30 Jun 1999 13:42:35 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Indexing
Message-Id: <bukdl7.e02.ln@magna.metronet.com>
Michael Burrows (michael.burrows@lineone.net) wrote:
: Do search engines index the web by traversing links? Would it be faster to
: delegate the indexing to web servers, and then merge indexes received back?
What is your Perl question?
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 30 Jun 1999 02:19:34 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: infobot for c.l.p.m
Message-Id: <7lburm$dae$1@news.NERO.NET>
In article <377d2b25.7448620@enews.newsguy.com>,
Marcel Grunauer <marcel.grunauer@lovely.net> wrote:
>But misc sure reads like a FAQ distribution system.
That's the problem. It isn't supposed to be that, but I cannot convince
the person who is distributing the FAQs there that it isn't. Maybe if
you tried?
A robot isn't going to solve that problem, it is going to hurt. A
DISCUSSION group is not the correct medium for sending commands to a
robot, and that is precisely what the group would be used for if a
robot was there to answer questions. You want input to a robot, give it
an email address and let it answer questions by email. Especially if
the only response it gives is via email. Why bother posting the question
if the answer appears only by mail?
>Creating noise? What do you think we're trying to do, unleash Eliza on
>.misc?
You are trying to unleash a robot on .misc.
>Newbie: "I'd like to use a variable name as a variable."
>
>Perliza: "Would it make you feel good to use a variable name as a
>variable?"
>
>This is not what we have in mind.
I don't see where I said it was.
>>From the outside, it looks like extreme arrogance. You decided the
>>.misc group was too noisy to suit you, so you created a moderated group
>>for yourselves. Now you decide to help out those poor fools who are still
>>using the .misc group...
>
>Such as Tom Christiansen, Randall Schwartz, Larry Rosler, Abigail, Uri
>Guttman... those poor fools?
I doubt that the robot would be programmed to ever respond to any of
those people. I expect that it would be explicitely programmed to ignore
them, so they won't be subjected to FAQs by mail when they ask
rhetorical or other questions. So, no, not those poor fools. The poor
fools who still ask questions, not the ones who keep posting the FAQs
and man pages ad infinitum.
>>Leave it alone. You didn't want to fix it when you were stuck there,
>>don't come back later and tell us you have the answer.
>
>Fix it when you were stuck there... Sounds like the demigods have
>ascended into heaven and have left the poor mortals to fight over the
>dying earike that to me.
>Romantic. But look at the volume of postings in .misc and
>in .moderated. By far most of the discussion takes place in .misc, so
>there can't have been too many people who have given up .misc for good
>and now only read .moderated, can there?
Who cares? A robot is still the wrong thing to run in a newsgroup. It
just looks really bad when one newsgroup starts proposing to run a robot
for some other newsgroup. If it should be done at all, it should have
been suggested in .misc in the first place. But better it not be done at
all, at least, not in .misc. Email is the best place.
------------------------------
Date: Wed, 30 Jun 1999 22:35:25 GMT
From: toto@toto.com (Todd Tolhurst)
Subject: Re: inplace edit
Message-Id: <377a9b2a.25651010@news-server>
On Wed, 30 Jun 1999 14:51:56 -0600, Kenneth Massey
<kpmasse@cs.sandia.gov> wrote:
>Here is the sum content of those 2 files on that subject:
Look closer... the section of perlrun which deals with the -i switch
tells all about in-place editing.
--
Todd Tolhurst
toto@toto.com
http://www.w3xpert.com/toto
------------------------------
Date: Wed, 30 Jun 1999 13:17:10 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: inplace edit
Message-Id: <mejdl7.e02.ln@magna.metronet.com>
Kenneth Massey (kpmasse@cs.sandia.gov) wrote:
: I read briefly somewhere that there is an inplace edit $^I
: that is ideal for an application like replacing one line in a long
: mailing list file. However, I can't find any detailed documentation on
^^^^^^^^^^^^
: how to use this feature.
That is exceedingly strange!
Where did you look?
The very *first place* to look of *any* perl problem is in
the documentation that you installed on your hard drive
when you installed perl.
perl -ne 'print "$ARGV: $_" if /\$\^I/' *.pod
Finds 4 lines. One of them part of Perl FAQ, part 5:
-----------------
How do I change one line in a file/
delete a line in a file/
insert a line in the middle of a file/
append to the beginning of a file?"
...
Perl can do this sort of thing for you automatically with the C<-i>
command-line switch or the closely-related C<$^I> variable (see
L<perlrun> for more details).
-----------------
The perlrun.pod section on the -i switch is over a hundred lines.
*I* would call that detailed documentation...
: Thanks,
Uh huh.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 30 Jun 1999 23:45:46 GMT
From: Jordan Hiller <hiller@email.com>
Subject: Re: Modules on Win32
Message-Id: <377AABAE.A3ECCEF4@email.com>
I've now upgraded ActivePerl and got PPM. However, they sure don't seem to have
a very complete set of modules. I need the following modules that don't seem to
be available from PPM:
LWP::Simple
HTML::FormatText
HTML::Parse (or is it HTML::Parser? an example code from the FAQ said
HTML::Parse)
How can I get these if they are not available through PPM?
Thanks again guys.
Craig Ciquera wrote:
>
> Jordan Hiller wrote:
>
> > I run ActiveState's Perl for Win32 on my Windows 98 machine. How do I install
> > modules from CPAN?
>
> ppm
>
> Craig
--
Jordan Hiller
hiller@email.com
:~
------------------------------
Date: Wed, 30 Jun 1999 14:38:33 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl in Web Server
Message-Id: <97odl7.a52.ln@magna.metronet.com>
Ignacio Bernabeu (igberso@iglobal.es) wrote:
: I have a little problem, I had made a CGI that needs some modules and
: last version of Perl.
: I use Netscape FastTrack Server that installs its Perl compiler, any
: suggestions of how to update?
: If I install the new version, the Web Server goes on executing its own
: preinstalled version of Perl.
: Any suggestions will be strongly appreciated.
I would suggest asking WWW server questions in a
WWW server newsgroup, such as:
comp.infosystems.www.servers.mac
comp.infosystems.www.servers.misc
comp.infosystems.www.servers.ms-windows
comp.infosystems.www.servers.unix
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 30 Jun 1999 13:35:43 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl or PNP...which is better?
Message-Id: <fhkdl7.e02.ln@magna.metronet.com>
Ben Coleman (tnguru@termnetinc.com) wrote:
: On Tue, 29 Jun 1999 12:20:03 -0400, tadmc@metronet.com (Tad McClellan)
: wrote:
: > What is PNP?
: PNP is a type of transistor(anyone remember discrete components?).
Sure. My undergraduate degree was in Electrical Engineering.
... but that was some time ago!
Thanks for refreshing my memory.
Then to answer the original question, I don't think Perl cares
how your semiconductors are doped.
: Which
: makes the question on the subject line an "apple and walnut" comparison.
apples and walnuts are both foodstuffs, and hence related.
I think the Subject is more like an "asphalt and cars" comparison.
:-(
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 30 Jun 1999 13:24:18 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl without Web-Server
Message-Id: <2sjdl7.e02.ln@magna.metronet.com>
Pletschette Andri (andre.pletschette@ltam.lu) wrote:
: At the other side, could you just give me the minimum Settings of the Apache
: WebServer to:
: - test CGI-Programs
: - to have a local domain
: - and letting every user make use of it
Apache is not Perl.
This is the Perl newsgroup.
Please ask Perl questions here.
Please ask questions about other things other places, such as:
comp.infosystems.www.authoring.cgi
comp.infosystems.www.servers.mac
comp.infosystems.www.servers.misc
comp.infosystems.www.servers.ms-windows
comp.infosystems.www.servers.unix
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 30 Jun 1999 18:25:43 -0400
From: Richie Crews <rccrews@infi.net>
Subject: Problem with cgi script and reading data...
Message-Id: <377A9966.107D4779@infi.net>
--------------74858485A2818F9D7E18624D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello,
I am working on a simple script, using CGI.pm. I can write the data out and I can read the data
however when i goto read it, it seems to ignore the other entries and post the same thing
the number of times there are entries in the data file..
sub read_data {
local($query) = @_;
open(DATAFILE, $datfile);
while (!eof(DATAFILE)) {
$query = new CGI(DATAFILE);
push (@queries, $query);
}
print h1("Previous Entries");
foreach $query (@queries) {
print h4("Name: ",param("name"),br());
print h4("E-mail Address: ",param("email"),br());
print h4("Web Page Address: ",a({-href=>param("webpage")},param("webpage")),br());
print h4("Sex: ", param("sex"),br());
print h4("Message: ",param("message"),br());
print hr();
}
close(DATAFILE);
}
Here is what happens or an example... someone enters in the information then it prints the data file
for the number of entries. IE.
let say there have been five posts in the data file, then the next person post the 6th one,
then the script reads the data and posts the last entry 6 times.. Any idea what i am doing wrong..
please any information or insight would be helpful, you can email me at rccrews@infi.net or simply post to group,
Thanks...
--------------74858485A2818F9D7E18624D
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<pre>Hello,</pre>
<pre> I am working on a simple script, using CGI.pm. I can write the data out and I can read the data</pre>
<pre>however when i goto read it, it seems to ignore the other entries and post the same thing</pre>
<pre>the number of times there are entries in the data file..</pre>
<pre></pre>
<pre>
sub read_data {
local($query) = @_;
open(DATAFILE, $datfile);
while (!eof(DATAFILE)) {
$query = new CGI(DATAFILE);
push (@queries, $query);
}
print h1("Previous Entries");
foreach $query (@queries) {
print h4("Name: ",param("name"),br());
print h4("E-mail Address: ",param("email"),br());
print h4("Web Page Address: ",a({-href=>param("webpage")},param("webpage")),br());
print h4("Sex: ", param("sex"),br());
print h4("Message: ",param("message"),br());
print hr();
}
close(DATAFILE);
}</pre>
<pre></pre>
<pre>Here is what happens or an example... someone enters in the information then it prints the data file</pre>
<pre>for the number of entries. IE.</pre>
<pre></pre>
<pre>let say there have been five posts in the data file, then the next person post the 6th one,</pre>
<pre>then the script reads the data and posts the last entry 6 times.. Any idea what i am doing wrong..</pre>
<pre>please any information or insight would be helpful, you can email me at rccrews@infi.net or simply post to group,</pre>
<pre></pre>
<pre>Thanks...</pre>
</html>
--------------74858485A2818F9D7E18624D--
------------------------------
Date: 30 Jun 1999 23:50:42 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Robot email/poster for this group
Message-Id: <7leagi$mij$1@news.NERO.NET>
In article <1du6pbw.i8zltj10kpcgqN@p79.tc2.metro.ma.tiac.com>,
Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote:
>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.
Yeah, they were so active in .misc that they forgot how to post here.
>The fact is simply that the discussion was started in the wrong group,
Yes, that is what I said. Why it was started there is the mystery.
In any case, this is not a robot group. It is a discussion group. The
robot belongs elsewhere. Mail, e.g..
------------------------------
Date: Wed, 30 Jun 1999 13:46:54 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: strange regex behaviour - don't understand what's going on
Message-Id: <e6ldl7.e02.ln@magna.metronet.com>
I.J. Garlick (ijg@connect.org.uk) wrote:
: Here is the sample code that produces said error :-
: #!/usr/bin/perl -w
: use strict;
: $/ = undef;
: my $txt = <DATA>;
: $txt =~ s{([^=])?(http://.*?)(\s+|[^/\w]+\s)}
: {$1<A HREF=$2 TARGET=newwin>$2</A>$3}gsx;
: print "$txt\n";
: __DATA__
: Just a load of rubbish to pad the data out. Just a load of rubbish to pad
: the data out. Just a load of rubbish to pad the data out. Just a load of
: rubbish to pad the data out.
: Now for the problem bit
: somewhere.com home: http://www.somewhere.com/group/thegroup
: http://www.somewhere.com - Doing something.
: -end of code-
: If you run it you will get the following error
: Use of uninitialised value at ./try.pl line 8, <DATA> chunk 1.
: followed by the output from the print statement.
I do not get any messages when I run that code...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 30 Jun 1999 23:17:03 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: strange regex behaviour - don't understand what's going on
Message-Id: <377AA535.D3915D5A@home.com>
[posted & mailed]
I.J. Garlick wrote:
>
> $txt =~ s{([^=])?(http://.*?)(\s+|[^/\w]+\s)}
> {$1<A HREF=$2 TARGET=newwin>$2</A>$3}gsx;
[snip]
> Use of uninitialised value at ./try.pl line 8, <DATA> chunk 1.
I get the warning for 5.004_04 but not 5.005_03. To fix for both,
change
([^=])?
to
([^=]?)
which will also protect you from the little not-clearing-backreference-
when-backtracking bug in there.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Wed, 30 Jun 1999 13:51:14 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: system() and exit status
Message-Id: <ieldl7.e02.ln@magna.metronet.com>
Paul Mutyambizi (paul.mutyambizi@citicorp.quit-spam.com) wrote:
: I have the following line in a perl (5.005_02) script on a Solaris 7
: box:
: system ("valdate -f %m%d%Y $DOPT") || die "blah, blah: $!"
^^
^^ the "usual" Perl idiom
for checking return values
: when $DOPT does not conform to the valdate format specified above as
: described in ckdate(1) then the
: exit status should be 1 or fail (e.g. $DOPT = 06311999 should give
^^^^^^^^^
: $?==1) otherwise the exit status should
: be 0 or success (e.g. $DOPT = 06301999 should give $?==0).
^^^^^^^^^^^^
But system() does not have a "usual" return value.
Its sense is inverted, it returns TRUE for failure and
FALSE for success, the opposite of how Perl's other
functions work.
So you need to invert the sense of your test:
system ("valdate -f %m%d%Y $DOPT") && die "blah, blah: $!"
^^
^^
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 30 Jun 1999 16:30:48 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: UK Perl job vacancy
Message-Id: <377AA8A8.93C0FF9D@mail.cor.epa.gov>
Laar wrote:
>
> On Tue, 29 Jun 1999 00:59:01 -0400, rjk@linguist.dartmouth.edu (Ronald
> J Kimball) wrote:
>
> >> o Travel to clients when required (e.g., Leeds, Holland, Denmark).
> >
> >Is it true what they say about the nightlife in Amsterdam?
> >(If you know what I mean...)
Rats. The place I 'get' to go next month is Wheeling, West
Virginia. Why doesn't anyone pay to send *me* to Holland?
:-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 29 Jun 1999 14:38:26 -0400
From: Slav Inger <vinger@mail.ford.com>
Subject: Re: why doesn't this for loop work
Message-Id: <377912A2.1123AE5A@mail.ford.com>
Yep, you used commas instead of semi-colons in the for() loop, which
thru your results off. By the way, even though pre- or
post-incrementing doesn't matter in this case, I'd think that
post-incrementing is a little cleaner and easier to read (??).
- Slav Inger.
- vinger@mail.ford.com
mike cardeiro wrote:
>
> hi
>
> i have a for loop that does not do what i expect it to do. basically it
> is three for loops wrapped into one. what i expect to have happen is
> each time the master loop (if there is such a term) goes through a
> cycle, a sub-loop goes through 3 cycles, each time pushing part of on
> array into another and incrementing $card_place.
>
> when that loop is finished another loop goes through 3 cycles each time
> printing out the sum of $card_place plus the number of loop this
> particular loop is on.
>
> when i read through it it seems like it should work but when i run it
> the final loop prints out the same number 3 times instead of 3
> consecutive numbers. anyway its probably easier to read than explain so
> the source code is below
>
> #!/usr/bin/perl -w
>
> require "pitchsub.cgi";
> $num_players = 2; # 3 players
> $card_place = 0;
>
> for ($y = 0, $y <= $num_players, ++$y) {
> for (0..2) {
> push @p_hand, $deck[$card_place];
> ++$card_place;
> }
> for ($a = 0, $a <= 2, ++$a) {
> print $card_place + $a, "\n";
> }
> }
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
------------------------------
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 6183
**************************************