[29613] in Perl-Users-Digest
Perl-Users Digest, Issue: 857 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 17 11:09:43 2007
Date: Mon, 17 Sep 2007 08:09: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 Mon, 17 Sep 2007 Volume: 11 Number: 857
Today's topics:
Re: $string =~ /$pattern/i <stoupa@practisoft.cz>
Re: $string =~ /$pattern/i <hjp-usenet2@hjp.at>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <bik.mido@tiscalinet.it>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <bik.mido@tiscalinet.it>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <bik.mido@tiscalinet.it>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <bik.mido@tiscalinet.it>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <abigail@abigail.be>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <bik.mido@tiscalinet.it>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <bik.mido@tiscalinet.it>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <bik.mido@tiscalinet.it>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <cwilbur@chromatico.net>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <bik.mido@tiscalinet.it>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <bik.mido@tiscalinet.it>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <bik.mido@tiscalinet.it>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <uri@stemsystems.com>
Re: csv, perl and German umlaute <stoupa@practisoft.cz>
Re: FAQ 4.18 Does Perl have a Year 2000 problem? Is Per <Peter@PSDT.com>
Re: FAQ 4.18 Does Perl have a Year 2000 problem? Is Per <bik.mido@tiscalinet.it>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 16 Sep 2007 03:34:53 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: $string =~ /$pattern/i
Message-Id: <fci2dj$9kl$1@ns.felk.cvut.cz>
Tad McClellan wrote:
> sln@netherlands.co <sln@netherlands.co> wrote:
>
>
>> Quote meta doesen't work for everything.
>
>
> Yes it does.
I don't know what version of Perl you use but in my Perl 5.6.1 quotemeta
sometime return curious results ;-)
print quotemeta('This is a string');
>This\ is\ a\ string
By me the space (0x20h) is not need to escape.
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
------------------------------
Date: Mon, 17 Sep 2007 13:16:45 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: $string =~ /$pattern/i
Message-Id: <slrnfesogt.est.hjp-usenet2@zeno.hjp.at>
On 2007-09-16 01:34, Petr Vileta <stoupa@practisoft.cz> wrote:
> Tad McClellan wrote:
>> sln@netherlands.co <sln@netherlands.co> wrote:
>>> Quote meta doesen't work for everything.
>>
>> Yes it does.
>
> I don't know what version of Perl you use but in my Perl 5.6.1 quotemeta
> sometime return curious results ;-)
>
> print quotemeta('This is a string');
>>This\ is\ a\ string
>
> By me the space (0x20h) is not need to escape.
The space must be escaped if used in a regexp with the /x modifier.
And escaping doesn't hurt otherwise, so this is not an example where
quotemeta "doesn't work".
hp
--
_ | Peter J. Holzer | I know I'd be respectful of a pirate
|_|_) | Sysadmin WSR | with an emu on his shoulder.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Sam in "Freefall"
------------------------------
Date: Mon, 17 Sep 2007 15:52:30 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <5s0te3hont6jpqp4tktfn9d1f8a17mj2ur@4ax.com>
On 13 Sep 2007 18:29:55 -0400, Charlton Wilbur
<cwilbur@chromatico.net> wrote:
>I think that both Usenet and Perlmonks are interactive media, and both
>are best served by an occasional post saying something like "there's
>an interesting conversation going on about $subject over on
>Perlmonks." People who want Perlmonks know where to find it, by and
Good point. I still beg to differ in that experimental evidence shows
that when giving just a link people tend not to answer: perhaps simply
warnock applies, but generally there's not evidence of posting in the
other media even anonymously either. Instead in this very thread you
can see that some people *did* answer taking advantage of their own
newsreaders' facilities. Some times even knowledgeable and smart
people must be "brought by hand".
Anyway those above are just a few random observations from me and I
won't take them as an excuse to keep doing so: it was my intent to
provide a *service* to the community, albeit admittedly a "minor" one.
But if it's not received as such, if it's annoying instead, then I'm
in no way investing my time and resources in such an activity?
>large, and it's not as if clpm is hurting for traffic.
What do you mean? Too much traffic or too little? Personally I'm now
ignoring most threads. I got tired of posts about how to "split a
line" or validate some params for webby stuff... There's very little
*interesting* traffic. But maybe that's just me.
>I don't think "Post it, and if people find it unwelcome they can
>filter it out" is a polite strategy to pursue. But I'm not the
I hope you will agree that it was an attempt at politeness. But as I
wrote, I'm not insisting anyway.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Mon, 17 Sep 2007 15:53:50 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <8m1te3teq44nkprt2rvr5aeiu9oap8pacn@4ax.com>
On Thu, 13 Sep 2007 22:40:19 GMT, Uri Guttman <uri@stemsystems.com>
wrote:
>i am not there because of the web api (why no news/email gateway?) and
^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^
>because i have never was into the monk culture. and yes i know plenty of
I would dream of such a beast.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Mon, 17 Sep 2007 15:59:46 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <9o1te3tk0ak0bgi0053frtk3ej7813nrhj@4ax.com>
On Thu, 13 Sep 2007 23:50:49 -0500, brian d foy
<brian.d.foy@gmail.com> wrote:
>> Well, of course if I see that many people agree with you and Abigail,
>> then I will stop doing so. Not that I do it *routinely* nor that I've
>> done that so many times...
>
>I agree with them. It's a lame thing to do, reposting other people's
>stuff (heh, from the guy who runs the perlfaq server :).
>
>Posting your own stuff is fine, or your own thoughts on someone else's
>ideas is fine, but just reposting something with no transformative
>effect is a pillar of copyright infringement, and it's rude to the
>author.
As I wrote in reply to Charlton, I'm stopping anyway, but I can't see
how so: are texts posted to public fora and newsgroups supposed to
count as copyrighted material? Do you see a problem of ethic nature?
(Especially taking into account the inclusion of proper attributions
and/*or* a link to the original post?)
Incidentally, a rewriting of an entire thread, summing up the
interesting bits in an organized manner and the rougher practice of
bare copying -but possibly for some formatting- are commonly separated
simply by a thing called *lack of time*.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Mon, 17 Sep 2007 16:01:50 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <042te3p4dj1020k97dh61k07kr92ua8rku@4ax.com>
On Sat, 15 Sep 2007 03:06:28 -0700, "Wade Ward" <zaxfuuq@invalid.net>
wrote:
>It serves as scaffolding to persons who are newer to the syntax. As far as
>I'm concerned, I solved the posed problem instantaneously, because I never
>got the question within this 24-hr. period that ends in the middle of the
>day, Italian time.
Of course the question was practical in nature, and the 24 hours limit
applied to that side of it. Though it was and still is interesting as
of itself. All this, of course, rigorously IMHO.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: 17 Sep 2007 14:05:53 GMT
From: Abigail <abigail@abigail.be>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <slrnfet2ck.4dv.abigail@alexandra.abigail.be>
_
Uri Guttman (uri@stemsystems.com) wrote on VCXXVI September MCMXCIII in
<URL:news:x7abrqjijw.fsf@mail.sysarch.com>:
// >>>>> "MD" == Michele Dondi <bik.mido@tiscalinet.it> writes:
//
// MD> On 13 Sep 2007 11:39:28 -0400, Charlton Wilbur
// MD> <cwilbur@chromatico.net> wrote:
//
// >> If Perlmonks is lacking in competent and knowledgeable posters, then
// >> perhaps it's time to reexamine their choice of interfaces. And if
//
// MD> Well, of course if I see that many people agree with you and Abigail,
// MD> then I will stop doing so. Not that I do it *routinely* nor that I've
// MD> done that so many times...
//
// i am not there because of the web api (why no news/email gateway?) and
A news/email gateway would give you the worst of two worlds, wouldn't it?
You'll get messages on usenet that don't quote context, and you'll get
webpages that contain the same text over and over again.
// because i have never was into the monk culture. and yes i know plenty of
// people there but i have seen too many idiots. there are idiots on usenet
// too but emacs makes it easier to ignore them.
Not to mention that on Perlmonks they don't care at all whether your
answer is correct or not. As long as you pat each other on the back,
telling how wonderful all the monks are, all is fine.
I rather not have the Perlmonk culture infiltrating on Usenet.
Abigail
--
END {print "Hacker\n"}
BEGIN {print "Just " }
CHECK {print "another "}
INIT {print "Perl " }
------------------------------
Date: Mon, 17 Sep 2007 16:11:31 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <re2te3ps96eoir30e858kd0v3qkanvd4ql@4ax.com>
On Fri, 14 Sep 2007 00:01:32 -0500, brian d foy
<brian.d.foy@gmail.com> wrote:
>How about posting original content of which you are the author? Talking
Sometimes I do. Didn't I?
>about a problem that you think is interesting, expounding on it, and so
>on would be a lot better.
Of course. Just as obviously I'm not that smart. And while *creating*
knowledge is a vastly superior activity, *spreading* it shouldn't be
that bad either.
>Otherwise, let the original authors decide where to post their own work.
Original authors often post just to one place out of habit and
convenience. Some readers just stick to reading in one place out of
habit and convenience. Some of the latter ones will miss forever some
interesting bits from some of the former ones sometime. I was trying
to contribute a tiny piece of help to remedy this situation; I was
probably wrong in my judgement, and I will refrain from doing so,
especially in one direction that is.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Mon, 17 Sep 2007 16:20:10 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <l03te352qrbro095d96thffssn4jrp3b3q@4ax.com>
On Thu, 13 Sep 2007 16:43:21 GMT, Uri Guttman <uri@stemsystems.com>
wrote:
>another crazy idea is to use something like $s1 =~ /(\0)/g to find and
>grab all the zero spots. then use @+ (or @- whichever works right) as a
That is what avar did.
http://perlmonks.org/?node_id=638563
>list of indexes to substr out of $s2 and into $s1. that line can be done
>in a for modifier. something like this (very untested):
>
> @zeroes = $s1 =~ /(\0)/g ;
> substr( $s1, $_, 1, substr( $s2, $_, 1 ) ) for @- ;
He did that in a /e:
sub subst
{
my ($s1, $s2) = @_;
my $s3 = $s1;
{
use bytes;
$s3 =~ s/(\0)/substr $s2, $+[0]-1, 1/eg;
}
$s3;
}
>one last idea is maybe bit::vector has such a feature or methods to
>build one. it is very fast and optimized for this sort of thing.
Somebody else suggested that. (I'm not really sure whether before or
after you.) But no actual code was provided or tested.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Mon, 17 Sep 2007 16:24:27 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <1d3te3ljm4bvllq5mhha7ar8kjridgtn1i@4ax.com>
On 13 Sep 2007 18:46:55 GMT, xhoster@gmail.com wrote:
>The problem with moritz is that it compares index(...) to >0, rather than
>either >-1 or >=0, for success, so it fails when the first char is \000. I
>fixed that, and changed to 4-argument substr.
You're right, but the error with the index was already corrected in an
update.
>For my own effort, I perhaps cheated by using Inline C, and depending on
>the C representations of both strings being null terminated.
There's another pair of C solutions:
http://perlmonks.org/?node_id=638724
(I'm not sure but I suppose that depending on the C representations of
both strings being null terminated is not appropriate *for this
particular problem*.)
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: 17 Sep 2007 10:21:18 -0400
From: Charlton Wilbur <cwilbur@chromatico.net>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <87r6kxxti9.fsf@mithril.chromatico.net>
>>>>> "MD" == Michele Dondi <bik.mido@tiscalinet.it> writes:
>> large, and it's not as if clpm is hurting for traffic.
MD> What do you mean? Too much traffic or too little? Personally
MD> I'm now ignoring most threads. I got tired of posts about how
MD> to "split a line" or validate some params for webby
MD> stuff... There's very little *interesting* traffic. But maybe
MD> that's just me.
I mean that clpm already has a great deal of traffic.
Much of it is admittely not interesting, but knowing that there's a
moderately to very interesting conversation going on in a place where
the interface sets my teeth on edge does not improve matters, and
neither does having selected posts from that conversation relayed here.
>> I don't think "Post it, and if people find it unwelcome they
>> can filter it out" is a polite strategy to pursue.
MD> I hope you will agree that it was an attempt at
MD> politeness. But as I wrote, I'm not insisting anyway.
No, I think you were attempting to improve the signal-to-noise ratio
of clpm, and that's to be commended. I just don't think you actually
succeded, because relaying signal from another place doesn't really help.
Charlton
--
Charlton Wilbur
cwilbur@chromatico.net
------------------------------
Date: Mon, 17 Sep 2007 16:29:54 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <sn3te3ld89fuftc3i88inip05q0g449hia@4ax.com>
On Fri, 14 Sep 2007 20:02:56 -0700, "Wade Ward" <zaxfuuq@invalid.net>
wrote:
>Wade Ward
>wade@zaxfuuq.net
>'If they took all the "And it came to pass's" out
>of the Book of Mormon, it would be a pamphlet.'
>--Mark Twain
>Hi. This is the qmail-send program at
>smtpauth04.prod.mesa1.secureserver.net.
>I'm afraid I wasn't able to deliver your message to the following addresses.
>This is a permanent error; I've given up. Sorry it didn't work out.
>
><bik.mido@tiscalinet.it>:
>213.205.33.35 does not like recipient.
>Remote host said: 552 RCPT TO:<bik.mido@tiscalinet.it> Mailbox disk quota
>exceeded
I gave you my *real* email address and my jabber contact in another
post. I'm writing to you in point of "test".
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Mon, 17 Sep 2007 17:01:03 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <ne5te313666i0o21jbkdpr46p5gvjr3urq@4ax.com>
On 17 Sep 2007 14:05:53 GMT, Abigail <abigail@abigail.be> wrote:
>// i am not there because of the web api (why no news/email gateway?) and
>
>A news/email gateway would give you the worst of two worlds, wouldn't it?
>You'll get messages on usenet that don't quote context, and you'll get
>webpages that contain the same text over and over again.
I *think* that it could be feasible, abeit hard, to automatically go a
long way in the direction of correcting this. Nothing 100% bulletproof
of course, and still requiring author's interventions. It would be
different if there were a (even more) restricted set of tags for the
web interface and a standard two way translation to pure text media.
>// because i have never was into the monk culture. and yes i know plenty of
>// people there but i have seen too many idiots. there are idiots on usenet
>// too but emacs makes it easier to ignore them.
>
>
>Not to mention that on Perlmonks they don't care at all whether your
>answer is correct or not. As long as you pat each other on the back,
>telling how wonderful all the monks are, all is fine.
>
>I rather not have the Perlmonk culture infiltrating on Usenet.
I don't share *entirely* Abigail's view, but I admit there's some
truth in it.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Mon, 17 Sep 2007 17:02:44 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <qn5te3do4plr9l56k4ltnr14fsiulm00bu@4ax.com>
On Mon, 17 Sep 2007 16:24:27 +0200, Michele Dondi
<bik.mido@tiscalinet.it> wrote:
>(I'm not sure but I suppose that depending on the C representations of
>both strings being null terminated is not appropriate *for this
>particular problem*.)
Please ignore this. I see it was addressed in another part of this
thread.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Mon, 17 Sep 2007 15:03:51 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <x7hclt8hbc.fsf@mail.sysarch.com>
>>>>> "A" == Abigail <abigail@abigail.be> writes:
A> _
A> Uri Guttman (uri@stemsystems.com) wrote on VCXXVI September MCMXCIII in
A> <URL:news:x7abrqjijw.fsf@mail.sysarch.com>:
A> // because i have never was into the monk culture. and yes i know plenty of
A> // people there but i have seen too many idiots. there are idiots
A> on usenet
A> // too but emacs makes it easier to ignore them.
A> Not to mention that on Perlmonks they don't care at all whether your
A> answer is correct or not. As long as you pat each other on the back,
A> telling how wonderful all the monks are, all is fine.
A> I rather not have the Perlmonk culture infiltrating on Usenet.
you expressed my dislike of their culture perfectly. they are more
cliquish that i want to deal with. when i did post some there a while
back, monks who know from nothing ragged my comments. i don't need to
fight twits who don't understand what i am saying. i don't want nor need
to climb a social (not technical) ranking system. that and the web
interface makes it a no brainer for me to ignore the monks.
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: Sun, 16 Sep 2007 03:53:36 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: csv, perl and German umlaute
Message-Id: <fci2dj$9kl$2@ns.felk.cvut.cz>
abadiya wrote:
>> I don't know what charset you use in html code but for accented
>> characters you can use HTML entity codes.
>
> But that would mean I have to use entities within the csv-file? If I
> do that Perl stops printing after the first umlaut because of the
> semicolon in the entity (e.g. ü). :(
You wrote in previous message:
> At the moment I'm trying to pull data out of a csv-file into an html
> file...
I mean to read csv file as is and recode on the fly to html entities.
For example csv file is this
---sample.csv---
Jürgen;Däniken;
---sample.csv---
and perl for read scv and send to user browser is this
---readcsv.cgi---
use strict;
use HTML::Entities;
print "Content-type: text/html\n\n<html>",
"<head><meta http-equiv=\"Content-Type\" content=\"text/html;
charset=iso-8859-2\">",
"</head>\n<body>\n";
open CSV,"< sample.csv" or die "Can't open csv file";
while (my $row = <CSV>)
{
my ($forname,$surname) = split(/;/, $row);
$forname = encode_entities($forname);
$surrname = encode_entities($surname);
print "$forname $surname\n<br>";
}
close CSV;
print "\n</body></html>\n";
---readcsv.cgi---
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
------------------------------
Date: Mon, 17 Sep 2007 13:59:11 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: FAQ 4.18 Does Perl have a Year 2000 problem? Is Perl Y2K compliant?
Message-Id: <pan.2007.09.17.13.59.06.125321@PSDT.com>
On Sun, 16 Sep 2007 15:34:49 -0500, Mumia W. wrote:
> On 09/16/2007 03:04 PM, Lars Eighner wrote:
>> In our last episode, <68b0s4-0ii.ln1@blue.stonehenge.com>, the lovely and
>> talented PerlFAQ Server broadcast on comp.lang.perl.misc:
>>
>>> 4.18: Does Perl have a Year 2000 problem? Is Perl Y2K compliant?
>>
>> Isn't it about time to give this FAQ its gold watch and send it off to the
>> home?
>
> No, it's still needed for historical reference, and there are a few
> people who will have to deal with pre-2000-written scripts.
>
> The discussion of some date issues is also important.
I think the issue is with the 'F' part of FAQ. Yes, there are people who
want to know the answer to this question, but are there enough of them
left to justify its inclusion in the FAQ? Is the FAQ supposed to be a
Hotel California of answers that can check in but never leave? Weigh
the concern that leaving it in will create among many readers the
impression that the FAQ must be moribund.
Somewhere not in the perl distribution but referenced from it we can
surely create a repository of answers to questions that used to be
frequently asked, and make the FAQ more relevant.
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
------------------------------
Date: Mon, 17 Sep 2007 16:54:13 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: FAQ 4.18 Does Perl have a Year 2000 problem? Is Perl Y2K compliant?
Message-Id: <i35te39tfv48b736b6h2ajl59ie0v01jrn@4ax.com>
On Mon, 17 Sep 2007 13:59:11 GMT, Peter Scott <Peter@PSDT.com> wrote:
>I think the issue is with the 'F' part of FAQ. Yes, there are people who
>want to know the answer to this question, but are there enough of them
>left to justify its inclusion in the FAQ? Is the FAQ supposed to be a
>Hotel California of answers that can check in but never leave? Weigh
>the concern that leaving it in will create among many readers the
>impression that the FAQ must be moribund.
Yes the FAQ has some entries which are more or less objectively
unlikely to rate F, but for what my opinion is worth, I don't see that
risk. I suppose it's difficult for someone to *accidentally* stumble
on that particular entry, or most others.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
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 V11 Issue 857
**************************************