[23166] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5387 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 18 21:05:44 2003

Date: Mon, 18 Aug 2003 18:05:07 -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           Mon, 18 Aug 2003     Volume: 10 Number: 5387

Today's topics:
    Re: 'make' implemented in Perl (Ken Williams)
    Re: can I still post here? <scripts_you_know_the_drill_@hudsonscripting.com>
    Re: CGI is not so hard <scripts_you_know_the_drill_@hudsonscripting.com>
    Re: CGI is not so hard <scripts_you_know_the_drill_@hudsonscripting.com>
    Re: CGI is not so hard <emschwar@pobox.com>
    Re: CGI is not so hard <scripts_you_know_the_drill_@hudsonscripting.com>
    Re: comp.lang.perl.open.discussion rfc in alt.config <scripts_you_know_the_drill_@hudsonscripting.com>
    Re: how to rename 200 files in many sub-directories? <krahnj@acm.org>
    Re: Hudson River <scripts_you_know_the_drill_@hudsonscripting.com>
    Re: Hudson River <scripts_you_know_the_drill_@hudsonscripting.com>
    Re: Hudson River <noreply@gunnar.cc>
    Re: Hudson River <matthew.garrish@sympatico.ca>
    Re: Hudson River <matthew.garrish@sympatico.ca>
    Re: Hudson River <scripts_you_know_the_drill_@hudsonscripting.com>
        local() sets to undef automatically? <usenet@expires082003.tinita.de>
    Re: local() sets to undef automatically? <uri@stemsystems.com>
    Re: local() sets to undef automatically? <jkeen@concentric.net>
    Re: local() sets to undef automatically? <usenet@expires082003.tinita.de>
    Re: Module::Build is yet more broken... (Ken Williams)
    Re: Order of evaluation of expressions (Mark Jason Dominus)
    Re: Order of evaluation of expressions (Mark Jason Dominus)
    Re: Order of evaluation of expressions <michael.p.broida@boeing.com>
    Re: Order of evaluation of expressions <michael.p.broida@boeing.com>
    Re: Order of evaluation of expressions <tony_curtis32@yahoo.com>
    Re: perl hacking for fun and pleasure <scripts_you_know_the_drill_@hudsonscripting.com>
    Re: Regular Expression Help <danglesocket@no_spam>
    Re: XML to CSV Conversion <jkeen@concentric.net>
    Re:  <bwalton@rochester.rr.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 18 Aug 2003 17:55:00 -0700
From: ken@mathforum.org (Ken Williams)
Subject: Re: 'make' implemented in Perl
Message-Id: <710171a3.0308181655.61c8812e@posting.google.com>

Hi,

I'm not on usenet much, but I just did a google groups search for
Module::Build in order to see whether there were questions about it
out in the world.  Feel free to Cc me if you'd like me to stay in the
conversation.

"Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de> wrote in message news:<bhf99g$666$1@nets3.rz.RWTH-Aachen.DE>...
> However, there is Module::Build which will sooner or later replace
> ExtUtils::MakeMaker. It no longer relies on make but instead produces a
> framework that will obey to
> 
>     perl Build.PL
>     ./Build
>     ./Build test
>     ./Build install
> 
> The first line will produce a Perl script 'Build' that contains all the
> functionality that was previously specified in Makefile.
> 
> Of course, such a change in the build process only makes sense when
> other tools can deal with it. For instance, h2xs wont yet create a
> module skeleton for Module::Build. I am not sure about CPAN.pm either.
> Current release might already be able to deal with those modules, but
> older ones certainly aren't.

Those issues aren't too bad.  First, it's really quite easy to convert
a project from MakeMaker to Module::Build.  I've done it with several
of mine.  In many cases people may keep both Makefile.PL and Build.PL
available.  See Module::Build::Compat for more information.

Also, for new modules, new versions of h2xs could rather trivially
emit M::B stubs rather than MM stubs.  And ExtUtils::ModuleMaker
already does.

Second, for compatibility with old CPAN.pm and such, Module::Build can
provide a Makefile.PL that passes commands through to Module::Build in
a couple of different ways, or it can provide a traditional
Makefile.PL that doesn't require the end user to have Module::Build
around at all.  Module::Build::Compat explains this too.

 -Ken


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

Date: Mon, 18 Aug 2003 19:31:14 -0700
From: hudson <scripts_you_know_the_drill_@hudsonscripting.com>
Subject: Re: can I still post here?
Message-Id: <op23kv0dermtkv99vpdam542gelfn6rnot@4ax.com>

>You got a certain reputation now, no doubt about that.
>But that's ok. If you are looking for comments and discussions about Perl
>issues you have then go ahead and post them.

Yes, I did read some of the posting guide for this group and on topic
here means trying to speak as much Perl as possible.

>On small advice: you may want to have a look at
>http://www.catb.org/~esr/faqs/smart-questions.html.
>Although not really related to Perl it may explain a bit about what is going
>on in technical newsgroups in general, about their sociology, and why you
>have been bashed.

OK...I have been reading the newsgroups for years and have read
similar guides before, but I realize I never really posted in the
newsgroups before...so going back to the basics about rules for
posting and how to react to flaming is actually very good advice for
me.

Thanks



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

Date: Mon, 18 Aug 2003 20:03:44 -0700
From: hudson <scripts_you_know_the_drill_@hudsonscripting.com>
Subject: Re: CGI is not so hard
Message-Id: <cn43kvsnkfs7uqffm8bbvju5k6at0bdv7c@4ax.com>

>I don't write to be cool, I right to get results (and to some deggrey
>to have fun). Re-impliementing something is not fun, unless of cause
>your doing it as a learning exprences and even then its better to
>throw away the code after you have finished.   

Yes...reading some more posts on the topic, I can see copying and
pasting code can get you into trouble down the line pretty quick.

>I know enought about NNTP and usenet to post by telnetting directly to
>the news port and typing stuff in.  However I use a newsreader.  Why?
>Because I don't wish to go to that effort. 

Yeah, I can use telnet to get a webpage or send mail...it is useful to
know if you are writing scripts that deal with these kind of things.
Of course I use a web browser or a mail client, but this is different
from writing a script that parses a webpage.


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

Date: Mon, 18 Aug 2003 20:08:11 -0700
From: hudson <scripts_you_know_the_drill_@hudsonscripting.com>
Subject: Re: CGI is not so hard
Message-Id: <gv43kvsnkrkfb5qmq0rgsibamahho5bi7s@4ax.com>

Thanks Juha for that post and you definitely made some great points
about the dangers of cuting and pasting code in a production
environment.

I'm still not 100% with you on CGI.pm. People around here seem very
loyal to it, but I have read in a lot of different places that it is
too large and slow, etc.


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

Date: Mon, 18 Aug 2003 18:33:17 -0600
From: Eric Schwartz <emschwar@pobox.com>
Subject: Re: CGI is not so hard
Message-Id: <etobrumscz6.fsf@wormtongue.emschwar>

hudson <scripts_you_know_the_drill_@hudsonscripting.com> writes:
> I'm still not 100% with you on CGI.pm. People around here seem very
> loyal to it, but I have read in a lot of different places that it is
> too large and slow, etc.

Keep in mind who's doing the writing.  Here: recognized experts in the
languages, often with several books on the language under their
belts.  There: some guy with a website?

The blessing of the Internet is that nobody has to get permission
to put anything they want to on line.  This is also its curse.

-=Eric
-- 
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
		-- Blair Houghton.


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

Date: Mon, 18 Aug 2003 20:54:08 -0700
From: hudson <scripts_you_know_the_drill_@hudsonscripting.com>
Subject: Re: CGI is not so hard
Message-Id: <gq73kvk838mb6mur5t9mh2i7pjb3ag1a9c@4ax.com>

On Mon, 18 Aug 2003 18:33:17 -0600, Eric Schwartz <emschwar@pobox.com>
wrote:

>Come to think of it, there are already a million monkeys on a million
>typewriters, and Usenet is NOTHING like Shakespeare.

very cute ;-)


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

Date: Mon, 18 Aug 2003 19:24:05 -0700
From: hudson <scripts_you_know_the_drill_@hudsonscripting.com>
Subject: Re: comp.lang.perl.open.discussion rfc in alt.config
Message-Id: <mg23kvg6iebf45m5bnui3eus7ppvije1q4@4ax.com>

>>>>   comp.lang.perl.misc.according-to-hudson
>>>
>>>Comes off a misc.
>> 
>> hehe...can we do this??
>
>I'm awfully tempted to newgroup alt.fan.hudson

how about:

comp.lang.perl.misc.hudson.evil.evil



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

Date: Tue, 19 Aug 2003 00:51:01 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: how to rename 200 files in many sub-directories?
Message-Id: <3F41745E.D049150@acm.org>

Geoff Cox wrote:
> 
> On Mon, 18 Aug 2003 10:25:57 GMT, "John W. Krahn" <krahnj@acm.org>
> wrote:
> 
> John,
> 
> I wonder if you could just explain what is happening in the sub ..?

Sure, it's not that complicated.  :-)


> >use warnings;
> >use strict;
> >
> >use File::Find;
> >use Archive::Zip;
> >
> >my $dir = 'c:/docs';
> >
> >find( sub {
> >    ( my $name = $_ ) =~ s/\.zip$/.doc/i or return;

$_ contains the name of the current file which is assigned to $name.  A
substitution is performed on $name and if it ends with the four
characters '.zip' (or '.ZIP' or '.Zip', etc.) they are replaced with the
four characters '.doc'.  If the substitution was not successful (the
file name didn't end in '.zip') return from the sub.  If successful $_
will contain 'somefile.zip' and $name will contain 'somefile.doc'.


> >    my $zip = Archive::Zip->new( $_ );

Create an Archive::Zip object using the file name in $_.


> >    $zip->extractMember( ($zip->memberNames)[ 0 ], $name );

Use $zip->memberNames to get the first file name from the zip archive
and use $zip->extractMember to store the contents of that file using the
file name in $name.


> >    unlink $_ or warn "Cannot delete $_: $!";

Delete (unlink) the file $_ or complain if you can't.


> >    }, $dir );

Use the directory name in $dir as the starting point in the search.



John
-- 
use Perl;
program
fulfillment


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

Date: Mon, 18 Aug 2003 19:35:02 -0700
From: hudson <scripts_you_know_the_drill_@hudsonscripting.com>
Subject: Re: Hudson River
Message-Id: <m333kvglu1dceli11fm3ebirb31hfr55bd@4ax.com>

wow....I am very afraid to even start to read this thread ;-)

by the way, the hudson river is right outside my door. I'm thinking of
putting my computer on a little raft and set it out to sea...


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

Date: Mon, 18 Aug 2003 19:55:05 -0700
From: hudson <scripts_you_know_the_drill_@hudsonscripting.com>
Subject: Re: Hudson River
Message-Id: <f343kv8u2sq56n5k4p0iob1g2p36vboder@4ax.com>

>The main point (and it's been made many, many times) is that posting bad
>code has consequences later on when Joe newbie does a Google search, finds a
>piece of code which appears to work for them and they start using it
>production code.
>
>How many times have you heard, "I found this piece of Perl code.  I don't
>understand how it does it, but it works well for me."  That is, it works
>well until its bugs/incompatibilities rear their nasty head after the
>environment or data it's running under changes.

I have just encountered this thought of "we must post good code to
protect those who seach google" here in this group...I must of seen it
several times in the last few days. I think it is part of the
mythology of this group.

I use google search, and I think anyone in their right mind does
several searches, reads several posts, trys things out and chooses the
best solution.

Many times I have used google and come up with bad answers or things
that don't work...that is part of the process.

But...I suspect that this google search rationale is used to enforce
group think. I don't want to be rude or anything, just calling it like
I see it.



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

Date: Tue, 19 Aug 2003 02:08:00 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Hudson River
Message-Id: <bhrpql$2h1pf$1@ID-184292.news.uni-berlin.de>

hudson wrote:
> wow....I am very afraid to even start to read this thread ;-)

No need to. Despite the subject line, it's (almost) not about you.

Btw, hope you don't mind my choice of subject line. After all, it was
all your posts that inspired me to start the thread. :)

> by the way, the hudson river is right outside my door. I'm thinking
> of putting my computer on a little raft and set it out to sea...

Don't. You do need to hold back you posts a bit, but there should be
less drastic methods.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Mon, 18 Aug 2003 20:13:34 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Hudson River
Message-Id: <6Zd0b.383$HB4.62604@news20.bellglobal.com>


"Tim Hammerquist" <tim@vegeta.ath.cx> wrote in message
news:slrnbk02bs.c3o.tim@vegeta.ath.cx...

> OP: You guys are a bunch of fascists!  See my replies where I say
>     as much to regular posters D, E, and F.
> EE: No thanks.
>

You should perhaps read some of Gunnar's posts. It's only too bad the
courtesy and thought he puts into his messages isn't always matched by those
responding.

Matt




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

Date: Mon, 18 Aug 2003 20:33:03 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Hudson River
Message-Id: <nfe0b.441$HB4.73018@news20.bellglobal.com>


"hudson" <scripts_you_know_the_drill_@hudsonscripting.com> wrote in message
news:f343kv8u2sq56n5k4p0iob1g2p36vboder@4ax.com...
>
> I have just encountered this thought of "we must post good code to
> protect those who seach google" here in this group...I must of seen it
> several times in the last few days. I think it is part of the
> mythology of this group.
>

Deep thoughts run shallow outside Perl in this group. In theory, their
protection of the group should have stopped you from posting. And for all
the derision heaped on innocent off-topic posters, the number of replies to
your posts say something about the duplicitous nature of some people. That
said, you are pushing the boundaries of good taste by clogging the group
with your posts.

Matt




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

Date: Mon, 18 Aug 2003 21:01:23 -0700
From: hudson <scripts_you_know_the_drill_@hudsonscripting.com>
Subject: Re: Hudson River
Message-Id: <9083kv4do2o92f1c5sck4orkse4uj2nhtj@4ax.com>

On Mon, 18 Aug 2003 20:33:03 -0400, "Matt Garrish"
<matthew.garrish@sympatico.ca> wrote:

>Deep thoughts run shallow outside Perl in this group. In theory, their
>protection of the group should have stopped you from posting. And for all
>the derision heaped on innocent off-topic posters, the number of replies to
>your posts say something about the duplicitous nature of some people. That
>said, you are pushing the boundaries of good taste by clogging the group
>with your posts.

Well...what's done is done...I would of rather skipped this whole
thing. But do you mean I shouldn't now take the time to read all
that's been posted and make some replies?

Also, I didn't quite catch your meaning about the duplicitous nature
of some people, but I guess I haven't been around here long enough to
understand it.

Aw well...heck...it's a public forum. And the public is all
things...sometimes pretty, sometimes ugly...that's life ;-)


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

Date: 18 Aug 2003 22:39:48 GMT
From: Tina Mueller <usenet@expires082003.tinita.de>
Subject: local() sets to undef automatically?
Message-Id: <bhrkjk$2earl$1@ID-24002.news.uni-berlin.de>

hi,
i recently saw a question in a perl forum about local().
the code was something like
 { local $/; $data = <FH> }
the question was, isn't there a missing ' = undef'?
and i said, no, local() sets it to undef automatically.
but then i was curious and searched the docs and could not find
that in perldoc -f local nor in perlsub.
does anybody know where this is documented?

thanks, tina
-- 
http://www.tinita.de/     \  enter__| |__the___ _ _ ___
http://Movies.tinita.de/   \     / _` / _ \/ _ \ '_(_-< of
http://www.perlquotes.de/   \    \ _,_\ __/\ __/_| /__/ perception
- my mail address expires end of august 2003 -


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

Date: Mon, 18 Aug 2003 22:51:07 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: local() sets to undef automatically?
Message-Id: <x7y8xq37hg.fsf@mail.sysarch.com>

>>>>> "TM" == Tina Mueller <usenet@expires082003.tinita.de> writes:

  TM>  { local $/; $data = <FH> }
  TM> the question was, isn't there a missing ' = undef'?
  TM> and i said, no, local() sets it to undef automatically.
  TM> but then i was curious and searched the docs and could not find
  TM> that in perldoc -f local nor in perlsub.
  TM> does anybody know where this is documented?

in perlsub in the sectiob Temporary Values via local():

        The argument list may be assigned to if desired, which allows
        you to initialize your local variables.  (If no initializer is
        given for a particular variable, it is created with an undefined
        value.)

this is a known feature and used like in places like your code. my also
initializes to undef by default.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: 18 Aug 2003 23:01:19 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: local() sets to undef automatically?
Message-Id: <bhrlrv$3ev@dispatch.concentric.net>


"Tina Mueller" <usenet@expires082003.tinita.de> wrote in message
news:bhrkjk$2earl$1@ID-24002.news.uni-berlin.de...
> hi,
> i recently saw a question in a perl forum about local().
> the code was something like
>  { local $/; $data = <FH> }
> the question was, isn't there a missing ' = undef'?
> and i said, no, local() sets it to undef automatically.
> but then i was curious and searched the docs and could not find
> that in perldoc -f local nor in perlsub.
> does anybody know where this is documented?
>
The most explicit discussion I could find was in perlfaq5.pod:

"How can I read in an entire file all at once?
[snip]
For those
who prefer not to use the toolbox, you can of course read the file
manually, although this makes for more complicated code.

    {
 local(*INPUT, $/);
 open (INPUT, $file)  || die "can't open $file: $!";
 $var = <INPUT>;
    }

That temporarily undefs your record separator, and will automatically
close the file at block exit.  If the file is already open, just use this:

    $var = do { local $/; <INPUT> };
"
It's also referred to in passing in perlfunc.pod




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

Date: 18 Aug 2003 23:25:11 GMT
From: Tina Mueller <usenet@expires082003.tinita.de>
Subject: Re: local() sets to undef automatically?
Message-Id: <bhrn8n$2djjd$1@ID-24002.news.uni-berlin.de>

Tina Mueller wrote:
[...]

> does anybody know where this is documented?

thanks for your answers, indeed, i was reading too quickly =)
(and maybe skipping sentences in parentheses, so i missed
that one...)

tina
-- 
http://www.tinita.de/     \  enter__| |__the___ _ _ ___
http://Movies.tinita.de/   \     / _` / _ \/ _ \ '_(_-< of
http://www.perlquotes.de/   \    \ _,_\ __/\ __/_| /__/ perception
- my mail address expires end of august 2003 -


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

Date: 18 Aug 2003 17:35:22 -0700
From: ken@mathforum.org (Ken Williams)
Subject: Re: Module::Build is yet more broken...
Message-Id: <710171a3.0308181635.6d8fb155@posting.google.com>

Hi Ilya,

Let me preface all my remarks by saying that I'm trying to lead with
the carrot here, not the stick.  If Module::Build doesn't offer
significant advantages over MakeMaker, then I would hope nobody will
switch.

Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote in message news:<bhp421$gn6$1@agate.berkeley.edu>...
> The beauty of Makefile.PL user interface (as opposed to the - faulty -
> packager's interface) is that it was shell-, OS-, filesystem-,
> etc-independent.  Now comes Build - and the invocation has the ./file
> syntax, which is system-dependent!

Yes, but barely.  And I hope people will be able to surmount this
obstacle and figure out how to run a perl script if they're installing
perl modules.


> This problem might have been trivial to fix when Module::Build was
> young - the fault is with trying to mimic MakeMaker's UI ;-) ;-(.  But
> judging by the reports, now Module::Build may be entrenched enough so
> that its UI can't be changed.

That's probably not true - we can do whatever we want.  There can also
be more than one interface to the functionality.  There's already the
Build.PL interface, and a programmatic interface we use for
cross-platform testing.  If you have a suggestion for how you'd like
to see it work, please open a thread on the Module::Build list,
module-build-general@lists.sourceforge.net .


> IMO, one should have abandon `make' and `make test'-like commands at
> all, doing the `make; make test' step by default during the `perl
> FirstStep.PL' phase.  If the finer control is needed, one should be
> able to specify this by arguments on the FirstStep.PL line.  

In order to ease the transition module authors may make from MakeMaker
to M::B, and in order to let people make distributions with both a
Makefile.PL and a Build.PL (which happens quite a lot, and might be
expected to happen basically forever), it is highly desirable that the
config/build/test process is very similar to MakeMaker's.  Also, I
considered lots of alternative ways to set things up when M::B was
young, and I decided that many of MakeMaker's metaphors made a lot of
sense, so I didn't change them.  This is one of the big ones I kept,
and I think that's been a good decision.  It has, for example, enabled
the creation of a pass-through Makefile.PL and Makefile, helping
transitional compatibility with CPAN.pm

 -Ken


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

Date: Mon, 18 Aug 2003 22:20:09 +0000 (UTC)
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Order of evaluation of expressions
Message-Id: <bhrjep$7hu$1@plover.com>

In article <4dafc536.0308180938.72123045@posting.google.com>,
 <nobull@mail.com> wrote:
>I suspect that MJD is asking precisely to bring to the fore the fact
>that the "language spec" (whatever that may be) currently doesn't
>comment one way or the other.

Actually, I was asking because I thought I remembered that it did, or
else that the consensus on P5P was that it was an undocumented
guaranteed feature, or else that Larry had said something along those
lines, but I couldn't remember which, if any, of those things were real.



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

Date: Mon, 18 Aug 2003 22:22:42 +0000 (UTC)
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Order of evaluation of expressions
Message-Id: <bhrjji$7r3$1@plover.com>

In article <slrnbk10md.srs.abigail@alexandra.abigail.nl>,
Abigail  <abigail@abigail.nl> wrote:
>Where is its order of evaluation documented? Where in the documentation
>does it say that:

Yes, that's what I would like to know.
Or, if it doesn't say that, I would like to know that it doesn't.

Does anyone have any actual facts?

I wasn't able to find anything about it in the manuals, but the
manuals are pretty badly organized on basic matters like this, so I'm
not sure I was looking in the right places.



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

Date: Mon, 18 Aug 2003 21:48:51 GMT
From: "Michael P. Broida" <michael.p.broida@boeing.com>
Subject: Re: Order of evaluation of expressions
Message-Id: <3F4149C3.20F6657C@boeing.com>

"Eric J. Roode" wrote:
> 
> "Michael P. Broida" <michael.p.broida@boeing.com> wrote in
> news:3F412BEA.DC9CA189@boeing.com:
> 
> >      Unless I'm missing something in your comment, it seems the
> >      question boils down to "what precedence do subroutine/function
> >      calls have?"
> 
> No, not really.  Precedence is different than order of evaluation.  In C,
> for example, precedence is well-defined, but order of evaluation is
> famously undefined.

	Ah, I -think- I see what you're saying.  Maybe.  <grin>

	Thanks.
		Mike


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

Date: Mon, 18 Aug 2003 22:00:03 GMT
From: "Michael P. Broida" <michael.p.broida@boeing.com>
Subject: Re: Order of evaluation of expressions
Message-Id: <3F414C63.7362EDCB@boeing.com>

"Eric J. Roode" wrote:
> 
> nobull@mail.com wrote in
> news:4dafc536.0308180938.72123045@posting.google.com:
> 
> > I'd like to see the "language spec" (whatever that may be) make a
> > statement one way or the other.
> >
> > Making it defined will reduce the scope for optomisations in Ponie.
> >
> > Making it undefied will break a lot of existing code.
> >
> > Not an easy choice.
> 
> In my humble opinion, as a long-time C and Perl programmer, the language
> ought to specify order of evaluation.  Imho, it is one of C's great
> weaknesses and sources of confusion that it does not define the OOE.  This
> is a huge confusion for many new programmers, and a continually recurring
> theme on comp.lang.c (at least, it had been for years when I stopped
> reading c.l.c a couple years ago).
> 
> If Perl does not currently guarantee OOE, I would vote that it should.  The
> potential gain in local platform-dependent optimization is not worth the
> non-portability and confusion.  My two cents.

	I always found that just breaking complex expressions down into
	simpler expressions will guarantee the order you desire.  Yes,
	it makes for longer, more wordy, programs, but it will do EXACTLY
	what you told it to do, without worrying about the language.  :)

	That's NOT to say that the language shouldn't specify and
	guarantee some specific order.  It's just that you can avoid
	any potential ordering problems by making it explicit in the
	extreme:
		$a = $b + $c;
		$a = $a * $z;
		$a = $a - $x;
	(For something THAT simple, I would keep it one line and use
	parens to force the order I want, even if it matches the language.
	The difference in the compile step is negligible.)

	Not "pretty" or "elegant", but it can't be misordered by the
	language processor.  Even that prior example with "shift()" calls
	can be broken down in the DESIRED order to avoid any possible
	language ordering conflicts.

		Mike


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

Date: Mon, 18 Aug 2003 17:44:39 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Order of evaluation of expressions
Message-Id: <87fzjy7fhk.fsf@limey.hpcc.uh.edu>

>> On Mon, 18 Aug 2003 21:48:51 GMT,
>> "Michael P. Broida" <michael.p.broida@boeing.com> said:

> "Eric J. Roode" wrote:
>>  "Michael P. Broida" <michael.p.broida@boeing.com>
>> wrote in news:3F412BEA.DC9CA189@boeing.com:
>> 
>> > Unless I'm missing something in your comment, it
>> seems the > question boils down to "what precedence do
>> subroutine/function > calls have?"
>> 
>> No, not really.  Precedence is different than order of
>> evaluation.  In C, for example, precedence is
>> well-defined, but order of evaluation is famously
>> undefined.

> 	Ah, I -think- I see what you're saying.  Maybe.
> <grin>

Precedence tells you how to construct the syntax tree for
e.g.

    a + b * c

         +
      a     *       a + (b * c)
          b   c

as opposed to

         *
      +     c       (a + b) * c
    a   b

Order of evaluation OTOH tells you in e.g. from the 2nd
interpretation:

    a + b

whether "a" or "b" will be evaluated first (e.g. "a" may
contain a side-effect that touches "b") which is partly a
tree-walking consideration.  We still know that (a + b)
will be evaluated in toto before the multiplication.

(Probably hideously over-simplified, compiler-writers take
pity on me :-)

hth
t


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

Date: Mon, 18 Aug 2003 19:44:28 -0700
From: hudson <scripts_you_know_the_drill_@hudsonscripting.com>
Subject: Re: perl hacking for fun and pleasure
Message-Id: <3b33kvc4a0j39kjdfpv9lom32c2l53kd6b@4ax.com>

>Then start up rec.perl.hacking. And leave this news group to a
>professional discussion about Perl. I make a living programming in
>Perl. Sometimes this news group is essential to getting that job done.

hey...this group is called comp.lang.perl.misc so I think my postings
are definately included in the misc catagory. Go start
comp.lang.perl.pro if you want to be exclusive. But, I can understand
needed a group like this for your work and that would give you a
different attitude than me.

>Some of the people who are trying to help you learn how to have fun
>with Perl make their living using Perl. Some of us have had to fight
>tooth and nail with project managers against misconception that Perl is
>not a "professional" programming language, and that Open Source
>projects are synonimous with "poor programming." 

Granted, the world is not always fun, and maybe it is not always fun
when dealing with Perl. Again, as I said this is because you use Perl
in a professional environment. It must color your outlook on this
newsgroup.

>When you post sloppy code "for fun and pleasure", you make my job
>harder.  The "bad Karma" you are experiencing is other programmers
>fighting to keep their craft professional.

Well...you can say sloppy, but don't really remember posting sloppy
code. Maybe code I was working on and seeking some comments about.
Isn't that what this is about? Or are you referring to me not using
CGI.pm?

>Your poor code posting immediately becomes a part of an archive
>available to anyone with google and the sense to search the archives
>first for the answers to their questions.

And again, it is not poor code, but code I am working on.

I use Google and anyone with the sense to search the archives also has
the sense to check several threads, read several posts, try out
several things and go with the best solution.

The bad karma is slappy people down and naming calling right off the
bat when they question why use a module. This is not the hacking
spirit.


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

Date: Mon, 18 Aug 2003 17:17:33 -0400
From: danglesocket<danglesocket@no_spam>
Subject: Re: Regular Expression Help
Message-Id: <3f414270@shknews01>

there are many great modules for parsing html, just in case your not aware
and work with a lot of html
One of the 'quick and eas(ier)' ones' is HTML::TokeParser.
it may be one your system. 
try:

perldoc HTML::TokeParser
or:
man HTML::TokeParser
or
perldoc HTML::Parser

if not you can find it on cpan. 



__danglesocket__



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

Date: 18 Aug 2003 23:01:17 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: XML to CSV Conversion
Message-Id: <bhrlrt$3eu@dispatch.concentric.net>


"James Willmore" <jwillmore@cyberia.com> wrote in message
news:20030818155810.44fe12fa.jwillmore@cyberia.com...
> On 18 Aug 2003 06:53:19 -0700
> anamalay@hotmail.com (Ravi) wrote:
> > Does anyone have a perl script handy to show me how to convert an
> > XML document to CSV format ?
>
> Someone has gone to the trouble of creating the XML::CSV module just
> for this purpose.
>

The shorthand description of XML::CSV is:  "Perl extension converting CSV
files to XML".  I couldn't find anything in the documentation that suggests
that this module goes the other way around.




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

Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: 
Message-Id: <3F18A600.3040306@rochester.rr.com>

Ron wrote:

> Tried this code get a server 500 error.
> 
> Anyone know what's wrong with it?
> 
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {

(---^


>     dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
 ...
> Ron

 ...
-- 
Bob Walton



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

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.  

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 5387
***************************************


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