[25579] in Perl-Users-Digest
Perl-Users Digest, Issue: 7823 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 24 09:06:01 2005
Date: Thu, 24 Feb 2005 06:05:28 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 24 Feb 2005 Volume: 10 Number: 7823
Today's topics:
[perl-python] generic equivalence partition <xah@xahlee.org>
Re: Annoying Problem with a Basic Perl app and XP Pro <do-not-use@invalid.net>
Re: Annoying Problem with a Basic Perl app and XP Pro <tintin@invalid.invalid>
Re: Annoying Problem with a Basic Perl app and XP Pro <tintin@invalid.invalid>
Re: Annoying Problem with a Basic Perl app and XP Pro <phaylon@dunkelheit.at>
Re: Annoying Problem with a Basic Perl app and XP Pro <phaylon@dunkelheit.at>
Re: Annoying Problem with a Basic Perl app and XP Pro <bastard@uni-koblenz.de>
Re: Annoying Problem with a Basic Perl app and XP Pro <bastard@uni-koblenz.de>
Re: Annoying Problem with a Basic Perl app and XP Pro <bastard@uni-koblenz.de>
Re: BerkeleyDB locking question <admin@asarian-host.net>
Re: compacting '..' path segments using File::Spec <nobull@mail.com>
Debugging Inline C programs <miyamoto.musashi@comcast.net>
Re: file parsing.. <wyzelli@yahoo.com>
Re: file parsing.. <wyzelli@yahoo.com>
Re: FTP from macro (Anno Siegel)
Re: FTP from macro brianr@liffe.com
Re: maximum size of a hash table <william@wilbur.25thandClement.com>
Re: maximum size of a hash table <matternc@comcast.net>
Re: maximum size of a hash table (Chris Richmond - MD6-FDC ~)
Re: OOP Tutorial <no@spam.nl>
Re: OOP Tutorial (Anno Siegel)
Re: Permission denied at C:/Perl/site/lib/XML/Handler/Y <nobull@mail.com>
Re: testing <matternc@comcast.net>
Re: unicode: =?iso-8859-1?Q?=E9=3D>e,_=E1=3D>a?= <vek@station02.ohout.pharmapartners.nl>
Re: unicode: =?iso-8859-1?q?=E9?==>e, =?iso-8859-1?q?=E <do-not-use@invalid.net>
Re: unicode: =?UTF-8?B?w6k9PmUsIMOhPT5h?= <ebohlman@omsdev.com>
XML:Simple and arrays of hashes <richard.lawrence@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 24 Feb 2005 03:48:53 -0800
From: "Xah Lee" <xah@xahlee.org>
Subject: [perl-python] generic equivalence partition
Message-Id: <1109245733.261643.219420@f14g2000cwb.googlegroups.com>
another functional exercise with lists.
Here's the perl documentation. I'll post a perl and the translated
python version in 48 hours.
=pod
parti(aList, equalFunc)
given a list aList of n elements, we want to return a list that is a
range of numbers from 1 to n, partition by the predicate function of
equivalence equalFunc. (a predicate function is a function that
takes two arguments, and returns either True or False.)
Note: a mathematical aspect: there are certain mathematical constraints
on the a function that checks equivalence. That is to say, if a==b,
then b==a. If a==b and b==c, then a==c. And, a==a. If a equivalence
function does not satisfy these, it is inconsistent and basically give
meaningless result.
example:
parti([['x','x','x','1'],
['x','x','x','2'],
['x','x','x','2'],
['x','x','x','2'],
['x','x','x','3'],
['x','x','x','4'],
['x','x','x','5'],
['x','x','x','5']], sub {$_[0]->[3] == $_[1]->[3]} )
returns
[[1],['2','3','4'],['5'],['6'],['7','8']];
=cut
In the example given, the input list's elements are lists of 4
elements, and the equivalence function is one that returns True if the
last item are the same.
Note that this is a generic function. The input can be a list whose
elements are of any type. What "parti" does is to return a partitioned
range of numbers, that tells us which input element are equivalent to
which, according to the predicate given. For example, in the given
example, it tells us that the 2nd, 3rd, 4th elements are equivalent.
And they are equivalent measured by the predicate function given, which
basically tests if their last item are the same integer. (note that if
we want to view the result as indexes, then it is 1-based index. i.e.
counting starts at 1.)
PS if you didn't realize yet, nested lists/dictionaries in perl is a
complete pain in the ass.
PS note that the code "sub {$_[0]->[3] == $_[1]->[3]}" is what's called
the lambda form, in Perl.
Xah
xah@xahlee.org
http://xahlee.org/PageTwo_dir/more.html
------------------------------
Date: 24 Feb 2005 09:52:45 +0100
From: Arndt Jonasson <do-not-use@invalid.net>
Subject: Re: Annoying Problem with a Basic Perl app and XP Pro
Message-Id: <yzd650iz6ea.fsf@invalid.net>
Dimitri Papoutsis <bastard@uni-koblenz.de> writes:
> Anno Siegel wrote:
>
> > Dimitri Papoutsis <bastard@uni-koblenz.de> wrote in comp.lang.perl.misc:
> >> A. Sinan Unur wrote:
> >>
> >> Now some advice for you, son:
> >> If you want to help someone DO it... if not, then DO NOT mention the
> >> accordant thread. I had a look on your pseudo-trial to response "arek" in
> >> a
> >
> > You can teach us how to run the newsgroup when you have some posting
> > history to speak of. Until then your opinion is of little interest.
>
> Oh , sorry daddy, i didn't know that... Will you please please forgive
> me ...
>
> > Oh, and look up "trial" in a dictionary.
>
> all you said <=> q.e.d. (in my posting)
This must mean that what Anno wrote was to be proved, and now you have
done so. Right?
> "trial <=> Versuch" was exactly what i meant to say. i base my criticism
> upon your ignorance and missing ability of differentiated
> thinking.
If "trial" means "Versuch", then "pseudo-trial" comes out as
"Pseudo-Versuch", which doesn't make much sense.
------------------------------
Date: Thu, 24 Feb 2005 23:15:22 +1300
From: "Tintin" <tintin@invalid.invalid>
Subject: Re: Annoying Problem with a Basic Perl app and XP Pro
Message-Id: <385nmaF5n0q65U1@individual.net>
"arek" <jpmythic@ntlworld.com> wrote in message
news:1109158855.718500.172280@o13g2000cwo.googlegroups.com...
> One Note to other users of Perl:
>
> XP Pro is far more strict in access to files and other things then XP
> Home...
> Be careful when writing apps and testing them on one then trying to run
> them on another
>
> What may run without problems on XP Home, may not necessarily run on XP
> Pro.
>
> The actual problem was in Accessing File Attributes in XP Pro...
> XP Pro requires Opening the File Before attempting to read Attributes..
Please post a small code snippet that supports your statement.
------------------------------
Date: Thu, 24 Feb 2005 23:18:12 +1300
From: "Tintin" <tintin@invalid.invalid>
Subject: Re: Annoying Problem with a Basic Perl app and XP Pro
Message-Id: <385nrlF5lh99lU1@individual.net>
"Peter Wyzl" <wyzelli@yahoo.com> wrote in message
news:Xw7Td.172774$K7.53800@news-server.bigpond.net.au...
> "arek" <jpmythic@ntlworld.com> wrote in message
> news:1109158855.718500.172280@o13g2000cwo.googlegroups.com...
>> One Note to other users of Perl:
>>
>> XP Pro is far more strict in access to files and other things then XP
>> Home...
>> Be careful when writing apps and testing them on one then trying to run
>> them on another
>>
>> What may run without problems on XP Home, may not necessarily run on XP
>> Pro.
>>
>> The actual problem was in Accessing File Attributes in XP Pro...
>> XP Pro requires Opening the File Before attempting to read Attributes..
>
> That is simply not true. If you believe it to be so, post a short (10
> lines
> or so) working program that demonstrates a requirement to open a file
> before
> stat will work.
>
> I use XP Pro with both fat32 and NTFS. I have never needed to open a file
> to stat it.
>
> Maybe you have some other problem?
Well, that plainly clear.
I can never understand the attitudes of new posters to this group who get
all agressive and defensive at the slightest hint of any criticism. I
suspect most of them have social and relationship problems if they have such
a thin skin.
------------------------------
Date: Thu, 24 Feb 2005 11:41:26 +0100
From: phaylon <phaylon@dunkelheit.at>
Subject: Re: Annoying Problem with a Basic Perl app and XP Pro
Message-Id: <pan.2005.02.24.10.41.26.780101@dunkelheit.at>
arek wrote:
> Mind you, It was ME not you that determined the Cause...
Who? *plonk*
--
http://www.dunkelheit.at/
The mind is its own place, and in itself
Can make a heaven of hell, a hell of heaven. -- Milton, »Paradise Lost«
------------------------------
Date: Thu, 24 Feb 2005 11:44:14 +0100
From: phaylon <phaylon@dunkelheit.at>
Subject: Re: Annoying Problem with a Basic Perl app and XP Pro
Message-Id: <pan.2005.02.24.10.44.14.60978@dunkelheit.at>
Dimitri Papoutsis wrote:
> Now some advice for you, son:
What's up in here? That's the second in 3 minutes.
oh, yes: *plonk*
--
http://www.dunkelheit.at/
-<[::..::::..::::..]>-
------------------------------
Date: Thu, 24 Feb 2005 14:16:14 +0100
From: Dimitri Papoutsis <bastard@uni-koblenz.de>
Subject: Re: Annoying Problem with a Basic Perl app and XP Pro
Message-Id: <cvkg97$pa7$1@news.uni-koblenz.de>
Arndt Jonasson wrote:
>
> Dimitri Papoutsis <bastard@uni-koblenz.de> writes:
>> Anno Siegel wrote:
>>
>> > Dimitri Papoutsis <bastard@uni-koblenz.de> wrote in
>> > comp.lang.perl.misc:
>> >> A. Sinan Unur wrote:
>> >>
>> >> Now some advice for you, son:
>> >> If you want to help someone DO it... if not, then DO NOT mention the
>> >> accordant thread. I had a look on your pseudo-trial to response "arek"
>> >> in a
>> >
>> > You can teach us how to run the newsgroup when you have some posting
>> > history to speak of. Until then your opinion is of little interest.
>>
>> Oh , sorry daddy, i didn't know that... Will you please please forgive
>> me ...
>>
>> > Oh, and look up "trial" in a dictionary.
>>
>> all you said <=> q.e.d. (in my posting)
>
> This must mean that what Anno wrote was to be proved, and now you have
> done so. Right?
No, all "what" Anno said prooved that he matches with the pattern of
behaviour which i criticized...
>> "trial <=> Versuch" was exactly what i meant to say. i base my
>> criticism
>> upon your ignorance and missing ability of
>> differentiated
>> thinking.
>
> If "trial" means "Versuch", then "pseudo-trial" comes out as
> "Pseudo-Versuch", which doesn't make much sense.
Really... why that ?
Definition: Pseudo-trial:
not even tried to do sth. but babbling as if...
Really no sense ?
Dimi
------------------------------
Date: Thu, 24 Feb 2005 14:32:26 +0100
From: Dimitri Papoutsis <bastard@uni-koblenz.de>
Subject: Re: Annoying Problem with a Basic Perl app and XP Pro
Message-Id: <cvkh7i$snn$1@news.uni-koblenz.de>
Tintin wrote:
> Well, that plainly clear.
>
> I can never understand the attitudes of new posters to this group who get
> all agressive and defensive at the slightest hint of any criticism. I
> suspect most of them have social and relationship problems if they have
> such a thin skin.
Hey Tintin (whatever your real name is..)
If somebody has nothing better to do than fighting for style-guidelines (of
coding / of correct posting behaviour), whithout even mentioning or
carefully reading a well defined problem and its corresponding
circumstances, has probable himself some inner imbalance, which must be
based upon his weak personality ...
What's this shit about "new" or "old" posters... Is this a newsgroup of the
"old" posters, and must "new" posters be careful not to get involved in
this kind of "territorial pissings"...
Dimi
------------------------------
Date: Thu, 24 Feb 2005 14:35:54 +0100
From: Dimitri Papoutsis <bastard@uni-koblenz.de>
Subject: Re: Annoying Problem with a Basic Perl app and XP Pro
Message-Id: <cvkhe2$snn$2@news.uni-koblenz.de>
phaylon wrote:
> Dimitri Papoutsis wrote:
>
>> Now some advice for you, son:
>
> What's up in here? That's the second in 3 minutes.
>
> oh, yes: *plonk*
Yeah baby... uhhh that hurts...
i'm getting hot by your really "hard" appearance ...
lotsa kisses
mommy
------------------------------
Date: Thu, 24 Feb 2005 10:09:35 +0100
From: "Mark" <admin@asarian-host.net>
Subject: Re: BerkeleyDB locking question
Message-Id: <F4qdnVz0qfBRBIDfRVnyiA@giganews.com>
"Paul Marquess" <Paul.Marquess@btinternet.com> wrote in message
news:3833e5F5fj92fU1@individual.net...
> Apart from that you don't need to do anything -- Berkeley DB handles
> the locking for you behind the scenes.
Thanks again for everything; it totally works as advertised. :)
While I have you on the line, though, I created a small dbase,
with the flags you suggested; like this:
if (not eval {$env = new BerkeleyDB::Env
-Cachesize => 1048576,
-Home => '/var/db/test',
-Flags => DB_CREATE|DB_INIT_CDB|DB_INIT_MPOOL}) {
log_error_and_exit ("Cannot open environment: $BerkeleyDB::Error");
}
And I got this:
drwx------ 2 nobody nobody 512 Feb 24 09:54 .
drwxr-xr-x 9 root wheel 512 Feb 24 09:52 ..
-rw------- 1 nobody nobody 8192 Feb 24 09:54 __db.001
-rw------- 1 nobody nobody 1318912 Feb 24 09:54 __db.002
-rw------- 1 nobody nobody 368640 Feb 24 09:54 __db.003
-rw------- 1 nobody nobody 49152 Feb 24 09:54 whitelist
The whitelist db only has 10 or so entries in it (for test only, of
course). Why the huge overhead? "__db.002" almost seems to suggest it
swaps the cache to disk. Which looks odd; unless I mistakenly took the
cachesize parameter for bytes, where it means 4K pages or something. :)
Using the Benchmark module, I timed that I could open/create db + env
around 1800/s, which is pretty darn fast. :) So, the actual overhead seems
negligible. I just really hope it does not write this huge "__db.002" file
to disk, everytime I open a dbase connection.
I appreciate your comments,
- Mark
------------------------------
Date: Thu, 24 Feb 2005 12:43:39 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: compacting '..' path segments using File::Spec
Message-Id: <cvkhrp$ibv$1@sun3.bham.ac.uk>
David Combs wrote:
> In article <1108795536.702248.313500@o13g2000cwo.googlegroups.com>,
> <ofer@netapt.com> wrote:
>
>>The "correct" way to do this is to use the Cwd.pm module, which has a
>>realpath() function that will resolve any '.' and '..' components in
>>the path.
>
>
> I'm surely doing something wrong, or maybe you have a newer emacs
> than mine,
What does emacs have to do with it?
> I can't find a "sub.*realpath' anywhere
So what?
I just so happens that realpath() is implemented as an alias to another
subroutine.
------------------------------
Date: Wed, 23 Feb 2005 23:53:44 -0800
From: Miyamoto Musashi <miyamoto.musashi@comcast.net>
Subject: Debugging Inline C programs
Message-Id: <U6WdnfKcXu-jFoDfRVn-2g@comcast.com>
Hi,
I've been looking all over the man pages for some information on
debugging C code from within Inline. I've been using if (DEBUG) lines
all over tracking down my problem code... is there an easier way to do
this? Can I [cross fingers] somehow use a debugger? If not, what have
you guys done to make this task less painful.
thanks
------------------------------
Date: Thu, 24 Feb 2005 08:33:08 GMT
From: "Peter Wyzl" <wyzelli@yahoo.com>
Subject: Re: file parsing..
Message-Id: <8jgTd.173522$K7.50527@news-server.bigpond.net.au>
<clearguy02@yahoo.com> wrote in message
news:1109188215.923039.18540@g14g2000cwa.googlegroups.com...
> Hi experts,
>
> I have below script and I need to translate a full name to a login ID.
>
> ===========================================
> while (<DATA>)
> {
> ($last, $first) = split ("\s+", $_);
> $login = $first[0] . $last;
> print "$login\n";
> }
>
> __DATA__
> Smith Bob
> Carter John
> Fisher Ann
> Lewis Maggy
> =======================================
>
> Output should be:
> ===============
> bsmith
> jcarter
> afisher
> mlewis
> =============
>
> How can I modify the aboe script to get the desired output?
My offering to the gods...
use strict;
use warnings;
while (<DATA>){
my $login = lc("$2$1") if m/(\S+)\s+(\w)/;
print "$login\n";
}
<STDIN>;
__END__
Smith Bob
Carter John
Fisher Ann
Lewis Maggy
P
--
Nothing to see here...
------------------------------
Date: Thu, 24 Feb 2005 08:35:19 GMT
From: "Peter Wyzl" <wyzelli@yahoo.com>
Subject: Re: file parsing..
Message-Id: <blgTd.173525$K7.77621@news-server.bigpond.net.au>
"Peter Wyzl" <wyzelli@yahoo.com> wrote in message
news:8jgTd.173522$K7.50527@news-server.bigpond.net.au...
> <clearguy02@yahoo.com> wrote in message
> news:1109188215.923039.18540@g14g2000cwa.googlegroups.com...
<snip>
> while (<DATA>){
> my $login = lc("$2$1") if m/(\S+)\s+(\w)/;
> print "$login\n";
> }
> <STDIN>;
The <STDIN> is just for my own testing (in Windows XP....)
P
--
Still nothing to see here...
------------------------------
Date: 24 Feb 2005 10:50:16 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: FTP from macro
Message-Id: <cvkbh8$4vu$1@mamenchi.zrz.TU-Berlin.DE>
arek <jpmythic@ntlworld.com> wrote in comp.lang.perl.misc:
> But don't take my word for it, ...
Don't you worry.
Anno
------------------------------
Date: Thu, 24 Feb 2005 13:54:39 +0000
From: brianr@liffe.com
Subject: Re: FTP from macro
Message-Id: <vtis4i83mo.fsf@ssdevws28.admin.liffe.com>
"arek" <jpmythic@ntlworld.com> writes:
> Actually my mistake...
> The Author had updated the AutoFtp.pl file to work with the newer
> Net::FTP
> I had originally worked with the earlier one he did, then later
> utilized this
> latest version.
>
> It is very well commented and easy to follow and understand.
>
> But don't take my word for it, check it out and see for yourself.
>
My interest was piqued. Had a quick look. Not impressed. How you can
say it is well commented and easy to follow is beyond me. There are
few comments in the code and most of those do not provide much useful
information. Also the formatting is poor, with inconsitent
indentation, which makes it hard to follow.
Also I noticed the following fairly elementary errors:
- No use of strictures or warnings
- Calling subroutines with '&' prefix
- Using 'local' instead of 'my'
Also seemed fairly *nix centric and therefore not very portable.
My interest un-piqued itself after that. IMHO, not to be recommended,
unless it is as an example of things not to do.
BTW I downloaded version 0.4, which seemed to be the latest, and it is
dated 1/24/00.
HTH
--
Brian Raven
Well, enough clowning around. Perl is, in intent, a cleaned up and
summarized version of that wonderful semi-natural language known as
"Unix".
-- Larry Wall in <1994Apr6.184419.3687@netlabs.com>
------------------------------
Date: Thu, 24 Feb 2005 00:13:03 -0800
From: William Ahern <william@wilbur.25thandClement.com>
Subject: Re: maximum size of a hash table
Message-Id: <fte0f2-mut.ln1@wilbur.25thandClement.com>
Lee <lskatz@gmail.com> wrote:
> I couldn't find a clear answer to this. Seems to be a lot of hearsay.
>
> Does anyone absolutely know the maximum size that a hash table can
> achieve?
AFAIK Perl grows hash tables by an order of 2 and does so as it deems
necessary (I dunno what the particular hueristics are). I suppose the number
of buckets is theoretically limited by the width of a pointer on the
particular architecture (32 or 64 bits) and thus the number of addressable
units, but generally speaking likely simply limited by available memory at
the time and with the caveat that since it grows exponentially the final
out-of-memory situation might bound the size much lower than expected.
------------------------------
Date: Thu, 24 Feb 2005 06:42:28 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: maximum size of a hash table
Message-Id: <6vidnRm9Tss5IIDfRVn-pw@comcast.com>
Lee wrote:
> I couldn't find a clear answer to this. Seems to be a lot of hearsay.
>
> Does anyone absolutely know the maximum size that a hash table can
> achieve?
No, they don't, because the answer changes depending on your situation.
A hash can grow until it uses all the free memory available to the
perl process, same as any other data structure in Perl.
--
Christopher Mattern
"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
------------------------------
Date: Thu, 24 Feb 2005 13:03:33 +0000 (UTC)
From: crichmon@filc8046.fm.intel.com (Chris Richmond - MD6-FDC ~)
Subject: Re: maximum size of a hash table
Message-Id: <cvkjb5$oh2$1@news01.intel.com>
In article <slrnd1qo46.7fp.tadmc@magna.augustmail.com>,
Tad McClellan <tadmc@augustmail.com> writes:
>You can keep adding elements until your machine runs out of memory.
Maybe this has long been resolved, but we had an app using 5.00404
that would keel over dead if the process size exceeded 1GB on
linux and HPUX.
Our software support guys made a customized version for Solaris
that would get around this limit. We've since re-done the app
to use Mysql for part of the data storage.
Chris
--
Chris Richmond | I don't speak for Intel & vise versa
------------------------------
Date: Thu, 24 Feb 2005 09:57:25 +0100
From: Paul Uiterlinden <no@spam.nl>
Subject: Re: OOP Tutorial
Message-Id: <cvk4tq$21b$1@voyager.news.surf.net>
Abigail wrote:
> $$ http://www.icon.co.za/~mobeus/easyoop.doc.zip (Word)
> $$ http://www.icon.co.za/~mobeus/easyoop.sxw.zip (Open Office)
>
> Oh. Never mind. I don't do Windows.
Huh? Open office works on *nix, and zip as well.
Paul.
------------------------------
Date: 24 Feb 2005 10:55:49 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: OOP Tutorial
Message-Id: <cvkbrl$4vu$2@mamenchi.zrz.TU-Berlin.DE>
Paul Uiterlinden <no@spam.nl> wrote in comp.lang.perl.misc:
> Abigail wrote:
> > $$ http://www.icon.co.za/~mobeus/easyoop.doc.zip (Word)
> > $$ http://www.icon.co.za/~mobeus/easyoop.sxw.zip (Open Office)
> >
> > Oh. Never mind. I don't do Windows.
>
> Huh? Open office works on *nix, and zip as well.
Abigail didn't say she can't, she said she doesn't.
Anno
------------------------------
Date: Thu, 24 Feb 2005 12:49:36 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Permission denied at C:/Perl/site/lib/XML/Handler/YAWriter.pm line 43.
Message-Id: <cvki6u$ign$1@sun3.bham.ac.uk>
Piet L. wrote:
> I get this error when I try following code:
Please do not put important information only in the subject of your
post. I assume 'this error' was 'Permission denied at
C:/Perl/site/lib/XML/Handler/YAWriter.pm line 43.'
> my $handler = XML::Handler::YAWriter->new(AsFile => "c:\\z.xml");
Perhaps you should explain how you have ruled out the blindingly obvious
explaination, namely that the process executing this code does not have
permission to write to c:\z.xml ?
------------------------------
Date: Thu, 24 Feb 2005 06:44:30 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: testing
Message-Id: <6vidnRi9TsuDI4DfRVn-pw@comcast.com>
Jürgen Exner wrote:
> Robin wrote:
> [nothing]
>
> Do you have a contribution about Perl, too?
>
> jue
Oh, I hope not.
--
Christopher Mattern
"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
------------------------------
Date: 24 Feb 2005 09:19:27 GMT
From: Villy Kruse <vek@station02.ohout.pharmapartners.nl>
Subject: Re: unicode: =?iso-8859-1?Q?=E9=3D>e,_=E1=3D>a?=
Message-Id: <slrnd1r70u.44r.vek@station02.ohout.pharmapartners.nl>
On Wed, 23 Feb 2005 20:23:46 -0500,
Wes Groleau <groleau+news@freeshell.org> wrote:
>
> On the other hand, I would think that people
> who use terminals/systems not capable of displaying
> diacritics would be well-accustomed to seeing such
> "errors." _Especially_ since so many people who
> ARE capable of handling them are too lazy to do so
> or just plain don't know how.
>
Perhaps, but it is language dependent how to express such characters
where they are not available. Germans have no problems replacing
ä with ae and ö with oe and ß with ss. In French you have to do that
differently, for example : é becomes e' è becomes e`. If you are
interested download the GNU program called "recode" and read the
documentation.
Villy
------------------------------
Date: 24 Feb 2005 09:58:10 +0100
From: Arndt Jonasson <do-not-use@invalid.net>
Subject: Re: unicode: =?iso-8859-1?q?=E9?==>e, =?iso-8859-1?q?=E1?==>a
Message-Id: <yzd1xb6z659.fsf@invalid.net>
Calle Dybedahl <posted@cyberpomo.com> writes:
> >>>>> "peter" == peter pilsl <pilsl@goldfisch.at> writes:
>
> > I'm working on a project, that is fully implemented in unicode. We
> > need to support non-unicode-able terminals in a very spartanic way.
> > By now we simple nuke everything that is not [a-z0-9] for these
> > terminals. But I think it could be done a bit better by replacing
> > common unicodes by their latin "nearbyes" like é=>e, á=>a ...
>
> No, that would be worse. If you just remove the characters that can't
> be displayed (preferably replacing them with question marks or
> something similar), it's obvious that your text has been changed.
Removing necessary marks from the letters is an atrocity, but the
alternative of removing the letters altogether is worse, I think.
Replacing them with digraphs is better, but may be language-dependent.
In some languages, such replacements are officially sanctioned; in others,
they are only a crutch. Examples:
é -> e' (or 'e)
è e`
ö oe
å aa
------------------------------
Date: 24 Feb 2005 09:50:30 GMT
From: Eric Bohlman <ebohlman@omsdev.com>
Subject: Re: unicode: =?UTF-8?B?w6k9PmUsIMOhPT5h?=
Message-Id: <Xns960728683AC88ebohlmanomsdevcom@130.133.1.4>
Wes Groleau <groleau+news@freeshell.org> wrote in news:384oktF5ikf4pU1
@individual.net:
> Or in Spanish, you might change
> "Tengo veinte años" (I'm twenty years old) to
> "Tengo veinte anos" (I have twenty anuses).
I'm reminded of Peter Bowditch's (an Australian skeptic) site, The
Millenium Project (<http://www.ratbags.com/rsoles>) which is subtitled "The
Fundaments of the 'Net"; he explains in detail the difference between
"millenium" and "millennium".
------------------------------
Date: 24 Feb 2005 05:12:04 -0800
From: "Richard Lawrence" <richard.lawrence@gmail.com>
Subject: XML:Simple and arrays of hashes
Message-Id: <1109250724.903404.294130@l41g2000cwc.googlegroups.com>
Hi there,
Consider the following XML in a file called "data.xml":
<user>
<name>Frank</name>
<age>27</age>
<friends>
<friend>
<name>Sue</name>
<location>London</location>
</friend>
<friend>
<name>Jane</name>
<location>Paris</location>
</friend>
</friends>
</user>
If I use the following:
#!/usr/bin/perl -w
use strict;
use XML::Simple;
my $user = XMLin("data.xml");
print "Hi, my name is " . $user->{name};
print " and I am " . $user->{age} . " years old. ";
print "My friends are ";
# Begin horrible code
my ($key, $value, $k, $v);
while(($key, $value) = each %{$user->{friends}})
{
while(($k, $v) = each %{$value})
{
print "$k (who lives in " . $v->{location} . ") and ";
}
}
# End horrible code
print "thats it!\n";
then I get the intended:
Hi, my name is Frank and I am 27 years old. My friends are Sue (who
lives in London) and Jane (who lives in Paris) and thats it!
which is great.
However as you have probably noticed from the code, the whole $key,
$value, $k, $v and nested while's looks really horrible to me and I'm
sure there is a far better way to do this.
Can anyone advise on the best way to re-write this section whilst still
maintaining readability?
Many thanks in advance,
Richard.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 7823
***************************************