[16539] in Perl-Users-Digest
Perl-Users Digest, Issue: 3951 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 8 14:18:29 2000
Date: Tue, 8 Aug 2000 11:15:18 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <965758518-v9-i3951@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 8 Aug 2000 Volume: 9 Number: 3951
Today's topics:
Re: reg expressions - protect html <care227@attglobal.net>
Re: reg expressions - protect html <godzilla@stomp.stomp.tokyo>
Re: reg expressions - protect html <care227@attglobal.net>
Re: reg expressions - protect html <godzilla@stomp.stomp.tokyo>
Re: Sendmail delivery failures <digitalj@uswest.net.not>
Re: Sendmail delivery failures (NP)
Tutorial for Perl/Sybase <mlee@cs.ust.hk>
Re: Tutorial for Perl/Sybase <ak@dasburo.de>
Upgrade 5.004 -> 5.6 and binary modules (Konstantinos Agouros)
Re: very cool routine <digitalj@uswest.net.not>
video decoder <travagli@ideare.com>
Re: what does foreach (0...10) do ??? nobull@mail.com
Re: what does foreach (0...10) do ??? (Andrew Johnson)
Re: what does foreach (0...10) do ??? <ren.maddox@tivoli.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 08 Aug 2000 11:21:41 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: reg expressions - protect html
Message-Id: <39902585.474B4948@attglobal.net>
Russ Jones wrote:
>
> He felte a thyng al rough and long yherd,
> And seyde, "Fy! allas! what have I do?"
>
> "Tehee !" quod she, and clapte the wyndow to,
> And Absolon gooth forth a sory pas.
>
> "A berd! a berd!" quod hende Nicholas,
> "By Goddes corpus, this goth faire and weel."
>
Man, Russ... you really need to be more carefull when you are
typing these posts... your spelling is horrible!
------------------------------
Date: Tue, 08 Aug 2000 08:57:53 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: reg expressions - protect html
Message-Id: <39902E01.E815F06A@stomp.stomp.tokyo>
Eli the Bearded wrote:
> Larry Rosler wrote:
> > Godzilla! wrote:
(snippage here and there, context retained)
> > > ... I would not use warnings nor strict.
> > > Both slow your program down and bloat memory usage.
> > Please provide some evidence to support this assertion. Unlike
> > religion, in computing as in other branches of engineering or science
> > assertions of this type must be verifiable.
> I love using the Benchmark module!
> Benchmark: timing 1000000 iterations ...
> WarnStrict: 19 wallclock secs (17.52 usr + 0.36 sys = 17.88 CPU)
> WarnNoStrict: 18 wallclock secs (16.95 usr + 0.38 sys = 17.33 CPU)
> NoWarnStrict: 19 wallclock secs (18.11 usr + 0.44 sys = 18.55 CPU)
> NoWarnNoStrict: 17 wallclock secs (17.00 usr + 0.41 sys = 17.41 CPU)
> use vars qw( $a $b );
> Different code in the function might yeild more intesting
> results. Try it and post.
I've been thinking on this since your posting. Currently
you show an average ratio of 19:17 for pragma versus
no pragma usage. Clearly use of pragma hints slows down a
script which implies some memory bloat as well. However,
your results don't reflect enough of a difference to
cause real concern, unless you extrapolate on this.
You used a very simple code snippet for testing. Seems
to me what you have stated about different results for
different codes, applies well and raises other questions
within my pea size brain.
A need to check complex coding with pragma would, logically,
increase this ratio significantly. I would think there are
some syntax which would be labor intensive for pragma checks,
such as associative arrays, packages, complex sub-routines,
references and the such. Under these circumstances, time
results from not using pragma hints would remain relatively
linear, simply being proportionate to script length and
complexiety. Time results from pragma use testing, would
inherently be quite non-linear as pragma checking itself
is a program which would become more involved with
increasing complexiety.
It seems to me, with larger more complex scripts, this
ratio between time factors, pragma versus no pragma,
could reach 2:1 or, use of pragma could possibly slow
down a script by a very significant human perceptible
amount, more than one of my eye blink measurements.
What really has me curious is use of my declarations
provides for release of memory blocks once a my variable
is 'used up' and gone. However, I am wondering if pragma
checking releases memory it uses to check my variables
once a my variable is destroyed and memory released.
Otherwords, does pragma checking release memory it no
longer needs as my variables are destroyed? I would
hedge a bet it doesn't. I would bet this pragma memory
usage is retained and wasted; deadwood.
This point you have made does imply use of pragma hints
might be an exceptionally poor choice for larger more
complex scripts, especially commercial scripts. It does
appear pragma hints might be very well contributing to
Perl's reputation for being slow and a memory hog.
So, advice to always use pragma hints, might be some
of the worst advice given. I would say removing pragma
hints from a program as soon as is reasonable, would
be sound good advice. This would speed up a program
and reduce memory usage; greater efficiency.
I've always been suspicious of pragma hints and often
suggest to not use them. Appears my suspicion just
might be valid.
Godzilla!
------------------------------
Date: Tue, 08 Aug 2000 12:32:29 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: reg expressions - protect html
Message-Id: <3990361D.47BBC626@attglobal.net>
"Godzilla!" wrote:
>
> I've always been suspicious of pragma hints and often
> suggest to not use them. Appears my suspicion just
> might be valid.
>
> Godzilla!
But it would be so much more meaningfull if you had taken the time
to make that determination _before_ you started giving out that
advice. As with the majority of what you say, your advice is
based entirely on your opinion, and not on fact.
------------------------------
Date: Tue, 08 Aug 2000 09:44:47 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: reg expressions - protect html
Message-Id: <399038FF.CF94FF8B@stomp.stomp.tokyo>
Drew Simonis wrote:
> "Godzilla!" wrote:
> > I've always been suspicious of pragma hints and often
> > suggest to not use them. Appears my suspicion just
> > might be valid.
> But it would be so much more meaningfull if you had taken the time
> to make that determination _before_ you started giving out that
> advice. As with the majority of what you say, your advice is
> based entirely on your opinion, and not on fact.
* laughs *
You are about as logical as teats on a razorback boar.
Godzilla!
------------------------------
Date: Tue, 08 Aug 2000 08:54:02 -0700
From: iJohn <digitalj@uswest.net.not>
Subject: Re: Sendmail delivery failures
Message-Id: <B5B57B29.209B%digitalj@uswest.net.not>
in article 27c9772c.27ea8901@usw-ex0101-008.remarq.com, Robert at
robertNOroSPAM@kronos.custard.org.invalid wrote on 8/7/00 2:26 PM:
> The script uses sendmail to send out to all
> the addresses, but is there a way of logging which emails in the
> list are invalid? In other words, can Perl, or sendmail, capture
> mail delivery failure notifications in any way?
You might want to look at Mail:Bulkmail (on CPAN). It produces three lists
after a mailing: good addresses, bad addresses, and address errors. (also
lets you mail merge into the messages.) It picks up addresses that don't
make it past the SMTP server it connects to. Unfortunately, lots of mail
will get past that point even though the user doesn't exist. In that case,
you get the bounced message to deal with.
Unfortunately, there seem to be so many formats for this that it is really
hard to detect that a message is a bounce (unless you force all bounces to a
particular account) and then to extract the address that was bad.
I wish some kind of standard could be produced for bounce messages from all
systems (even those god-awful exchange things). Just a simple header with
the email address and a reason code would sure make life easier. If all
servers returned the headers of the bad message, you could put in your own
header on the outgoing message for this purpose, but they don't.
--
I support the Freedom to Innovate: that's why I use a Mac.
------------------------------
Date: Tue, 08 Aug 2000 16:01:49 GMT
From: nvp@spamnothanks.speakeasy.org (NP)
Subject: Re: Sendmail delivery failures
Message-Id: <N9Wj5.451019$MB.6794280@news6.giganews.com>
Tue, 08 Aug 2000 10:11:09 GMT, Andre van Straaten <andre@UltraShell.Net> wrote:
:
: AFAIK if you try the telnet protocol on port 25 (talking to the SMTP
: daemon of the addressee's host) with "HELO" and like that, you'll get an
: immidiate reply for invalid addresses (on that host).
Huh?
bash-2.03$ telnet some-host.other.com 25
Trying 192.168.0.3...
Connected to some-host.other.com.
Escape character is '^]'.
220 some-host.other.com ESMTP Sendmail 8.10.0/8.10.0; Tuesday, 8 \
Aug 2000 11:53:38 -0400 (EDT)
HELO something.com
250 something.something.com Hello some-host [192.168.0.3], pleased to meet you
Even if you were refering to VRFY or EXPN -- there's no guarantee that
the remote host's MTA is configured to deal with VRFY/EXPN (or maybe
they've just turned these functions off).
--
Nate II
------------------------------
Date: Wed, 09 Aug 2000 00:28:13 +0800
From: Michael Lee <mlee@cs.ust.hk>
Subject: Tutorial for Perl/Sybase
Message-Id: <3990351D.874950A6@cs.ust.hk>
Michael wrote:
Hi,
Does anyone can suggest any tutorial/example for Perl/Sybase?
I'm going to write a simply web access database that use
CGI/Perl + Sybase.
Thanks for your kindly help.
------------------------------
Date: Tue, 08 Aug 2000 19:25:28 +0200
From: Alexander Knack <ak@dasburo.de>
To: Michael Lee <mlee@cs.ust.hk>
Subject: Re: Tutorial for Perl/Sybase
Message-Id: <39904288.C01863B3@dasburo.de>
> Does anyone can suggest any tutorial/example for Perl/Sybase?
> I'm going to write a simply web access database that use
> CGI/Perl + Sybase.
>
> Thanks for your kindly help.
a very good way to start is with:
http://www.mbay.net/~mpeppler/
--
+--------------------------------------------------------------------+
| Alexander Knack ........Entropie erfordert keine Wartung .........|
| dasburo.de ..................................................|
+--------------------------------------------------------------------+
------------------------------
Date: 8 Aug 2000 07:52:15 +0200
From: elwood@news.agouros.de (Konstantinos Agouros)
Subject: Upgrade 5.004 -> 5.6 and binary modules
Message-Id: <elwood.965713777@news.agouros.de>
Hi,
I am currently running 5.004 and I want to upgrade. I have quite a number
of binary modules installed (some written by me). Does this work? I remember
that I have seen a question 'backward compatibility for binary modules' in
older version of perl. Is this still so?
Are there other caveats in the upgrade?
Konstantin
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elwood@agouros.de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not sustain the forming of the cosmos." B'Elana Torres
------------------------------
Date: Tue, 08 Aug 2000 08:58:54 -0700
From: iJohn <digitalj@uswest.net.not>
Subject: Re: very cool routine
Message-Id: <B5B57C4D.209C%digitalj@uswest.net.not>
in article 8mccif$1ltv$1@reader.nmix.net, Robin Bank at rbank@csf.edu wrote
on 8/3/00 11:11 AM:
> And, let's
> face it, grumpy old men are not perl hackers...
Yes they are.
--
I support the Freedom to Innovate: that's why I use a Mac.
------------------------------
Date: Tue, 08 Aug 2000 14:53:17 -0400
From: Maria Travaglini <travagli@ideare.com>
Subject: video decoder
Message-Id: <3990571D.B149BAA8@ideare.com>
Hello all,
I'd need to convert a certain number of different video files into mpeg
format.
I've had a quick look at CPAN archive and I didn't find anything
suitable.
Another option is to just extract a single frame from the video file.
The most common file formats that I'm interested in are AVI, quicktime
and
realmovie.
Any help will be appreciated.
Thanks in advance,
Maria
------------------------------
Date: 08 Aug 2000 17:37:17 +0100
From: nobull@mail.com
Subject: Re: what does foreach (0...10) do ???
Message-Id: <u9r97zu2te.fsf@wcl-l.bham.ac.uk>
Jonathan Stowe <gellyfish@gellyfish.com> writes:
> On Tue, 08 Aug 2000 08:38:11 GMT, Steve Button Wrote:
> > Notice the three dots instead of two. It seems to work, but why??
>
> Read about the 'Range Operators' in the perlop manpage -
Good advice, perhaps _you_ should.
> the two and three dot versions only behave differently in a scalar
> context, they behave the same in a list context.
Eh, actually as far as I can see the behaviour of ... in a list
context is undefined.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Tue, 08 Aug 2000 17:07:18 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: what does foreach (0...10) do ???
Message-Id: <a7Xj5.21320$k5.211620@news1.rdc1.mb.home.com>
In article <u9r97zu2te.fsf@wcl-l.bham.ac.uk>,
nobull@mail.com <nobull@mail.com> wrote:
> Jonathan Stowe <gellyfish@gellyfish.com> writes:
[snip]
> > the two and three dot versions only behave differently in a scalar
> > context, they behave the same in a list context.
>
> Eh, actually as far as I can see the behaviour of ... in a list
> context is undefined.
In perlop for 5.6.0 it says:
If you don't want it to test the right operand till the next
evaluation, as in sed, just use three dots ("...") instead of
two. In all other regards, "..." behaves just like ".." does.
I think 'all other regards' would include list context -- so it
appears that this behaviour has now been defined.
andrew
--
Andrew L. Johnson http://members.home.net/andrew-johnson/
I've always maintained a cordial dislike for indent, because it's
usually right.
-- Larry Wall in <199806221558.IAA07251@wall.org>
------------------------------
Date: 08 Aug 2000 12:10:48 -0500
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: what does foreach (0...10) do ???
Message-Id: <m37l9rd6g7.fsf@dhcp11-177.support.tivoli.com>
nobull@mail.com writes:
> Jonathan Stowe <gellyfish@gellyfish.com> writes:
> > the two and three dot versions only behave differently in a scalar
> > context, they behave the same in a list context.
>
> Eh, actually as far as I can see the behaviour of ... in a list
> context is undefined.
perldoc perlop:
... If you don't want it to test the right
operand till the next evaluation, as in sed, just use
three dots ("...") instead of two. In all other regards,
"..." behaves just like ".." does.
I suppose there could be some question as to what the context of "In
all other regards" is, but it seems that the most natural
interpretation is that "all" really means "all", and includes behavior
in a list context.
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 3951
**************************************