[31493] in Perl-Users-Digest
Perl-Users Digest, Issue: 2752 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 5 11:09:45 2010
Date: Tue, 5 Jan 2010 08:09:11 -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 Tue, 5 Jan 2010 Volume: 11 Number: 2752
Today's topics:
Re: How to put '#!/usr/bin/env perl -w' at the beginnin (aka ? the Platypus)
Re: How to put '#!/usr/bin/env perl -w' at the beginnin <nospam-abuse@ilyaz.org>
Re: I need to make some cash here <bugbear@trim_papermule.co.uk_trim>
Re: I need to make some cash here <ralph.malph@altavista.com>
Re: most efficient way to get number of files in a dire <smallpond@juno.com>
Parse::RecDescent erreichbarkeit von Variablen <martinbley@yahoo.de>
Re: Parse::RecDescent erreichbarkeit von Variablen <martinbley@yahoo.de>
Re: Parse::RecDescent erreichbarkeit von Variablen <sreservoir@gmail.com>
Re: Parse::RecDescent erreichbarkeit von Variablen <martinbley@yahoo.de>
Re: Parse::RecDescent erreichbarkeit von Variablen <sreservoir@gmail.com>
Re: Parse::RecDescent erreichbarkeit von Variablen <tzz@lifelogs.com>
Re: perl in BartPE: locale warning <keith.watson@cc.gatech.edu>
Re: perl in BartPE: locale warning <nospam-abuse@ilyaz.org>
unicode newbie, can you help? <alexxx.magni@gmail.com>
Re: unicode newbie, can you help? <RedGrittyBrick@spamweary.invalid>
Re: unicode newbie, can you help? <jurgenex@hotmail.com>
Re: unicode newbie, can you help? <OJZGSRPBZVCX@spammotel.com>
Re: unicode newbie, can you help? <alexxx.magni@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 05 Jan 2010 04:22:44 GMT
From: "David Formosa (aka ? the Platypus)" <dformosa@usyd.edu.au>
Subject: Re: How to put '#!/usr/bin/env perl -w' at the beginning of a perl script?
Message-Id: <00cc4371$0$15644$c3e8da3@news.astraweb.com>
On Wed, 30 Dec 2009 21:04:14 +0000 (UTC), Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote:
> On 2009-12-30, Randal L. Schwartz <merlyn@stonehenge.com> wrote:
>>>>>>> "Ruud" == Ruud <rvtol+usenet@xs4all.nl> writes:
>>
>>Ruud> I prefer -w in scripts too, because it enforces warnings on the included
>>Ruud> code.
>>
>> So you want to spend time debugging someone else's code? :)
>
> First: as opposed to what?
As opposed to working on code you are responsible for.
------------------------------
Date: Tue, 5 Jan 2010 06:34:45 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: How to put '#!/usr/bin/env perl -w' at the beginning of a perl script?
Message-Id: <slrnhk5nc5.v5l.nospam-abuse@powdermilk.math.berkeley.edu>
On 2010-01-05, David Formosa (aka ? the Platypus) <dformosa@usyd.edu.au> wrote:
> On Wed, 30 Dec 2009 21:04:14 +0000 (UTC), Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote:
>> On 2009-12-30, Randal L. Schwartz <merlyn@stonehenge.com> wrote:
>>>Ruud> I prefer -w in scripts too, because it enforces warnings on the included
>>>Ruud> code.
>>>
>>> So you want to spend time debugging someone else's code? :)
>>
>> First: as opposed to what?
> As opposed to working on code you are responsible for.
You look sure this is what Randal had in mind... I'm not.
Ilya
P.S. Responsibility is transitive; Randal, surely, knows this. If
you decide to use a module, its bugs become your responsibility.
------------------------------
Date: Mon, 04 Jan 2010 09:14:28 +0000
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: I need to make some cash here
Message-Id: <q8WdnVwuUMzpLNzWnZ2dnUVZ8nZi4p2d@brightview.co.uk>
sln@netherlands.com wrote:
> On Sun, 03 Jan 2010 03:13:26 -0500, "Uri Guttman" <uri@StemSystems.com> wrote:
>> uri
>
> You place your dick between your fingers and jerk off all day buddy!
If any potential employer checks your history on USENET, you ain't
gonna' look good.
BugBear
------------------------------
Date: Tue, 05 Jan 2010 10:54:41 -0500
From: Ralph Malph <ralph.malph@altavista.com>
Subject: Re: I need to make some cash here
Message-Id: <hhvnc5$geq$1@speranza.aioe.org>
Uri Guttman wrote:
>>>>>> "s" == sln <sln@netherlands.com> writes:
>
> s> On Sun, 03 Jan 2010 02:31:50 -0500, "Uri Guttman" <uri@StemSystems.com> wrote:
> >>>>>>> "s" == sln <sln@netherlands.com> writes:
> >>
> s> My unemployment is running out here in California.
> s> I can do anything, give me a job.
> >>
> >> get some coding skills and then apply to macdonald's as a fry cook.
> >>
> >> uri
> s> Why don't you suck my dick asshole, i fucked your wife last night ..
> s> She's as good as you at Perl. LMAO
>
> i will ask her about it and then laugh seeing you on the food stamp line
> that you are on.
If you are so successful yourself why did you lose
your home last year?
> i place perl people and you would be the last one on my
> list.
laughable claim. You can't even "place" yourself
anywhere!
>[snip]
Mr. sln,
Ignore Uri. While he is good at posting advice on
basic perl for beginner to intermediate
programmers he himself is a professional failure.
Nice enough guy I suppose and well liked online.
Unfortunately, he is a total failure irl.
If you saw him or that wife of his you would
retch at your boasts of having sexed her.
Combined they must tip the scales at 700+
pounds with Uri making up about 400 of that.
Uri's claims of "placing programmers" and
other such claims of professional success are all
lies. He has placed very few if any people.
Professionally, he mainly just codes vanity open
source projects at his home. Most of his
income is from his wife's marginal business of
selling chocolate to other fatasses.
He hasn't coded anything worthwhile in years and
has ridden the wave of some ten or more year old
successes long enough. I am sick of seeing him
pull this crap and badmouth other people.
Just ignore him. He should be dead of a massive
heart attack soon anyway.
------------------------------
Date: Mon, 4 Jan 2010 10:03:00 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: most efficient way to get number of files in a directory
Message-Id: <a57d89b9-07d2-46c2-a49e-35e15319f87a@c34g2000yqn.googlegroups.com>
On Jan 3, 5:46=A0pm, "g...@vi-anec.de" <g...@vi-anec.de> wrote:
> Hello,
>
> I am searching the most efficient way to get the number of files
> in a directory =A0(up to 10^6 files). I will use the nr as a stop
> condition
> of of generation process so the method must be applied during this
> process
> a lot of times. Therefore it must be efficient and opendir is not the
> choice.
>
> I am thinking about the bash command "ls | wc -l"
> but I don't know how to get this in a perl variable.
>
> Thank you very much for any help!
What file system and OS?
------------------------------
Date: Tue, 5 Jan 2010 03:40:02 -0800 (PST)
From: Martin Bley <martinbley@yahoo.de>
Subject: Parse::RecDescent erreichbarkeit von Variablen
Message-Id: <6436e6f7-3632-4235-82f7-5f88fd162ae5@34g2000yqp.googlegroups.com>
Hallo NG,
folgendes Problem:
Ich habe ein Package mit dem Namen DhcpParser. In diesem Package gibt
es eine Methode parseFile. Innerhalb der Grammatik m=F6chte ich nun die
geparsten Werte in einen Array schreiben und aus der Methode
via return Anweisung zur=FCckgeben. Leider habe ich au=DFerhalb der
Grammatik keinen Zugriff auf die Variablen
(namentlich @hosts).
In der Doku steht, dass die Variablen im Kontext von Parse::RecDescent
zu sehen sind, wie kann ich
aber darauf aus der Methode parseFile() zugreifen? Da steh ich
wirklich
auf dem Schlauch. Weiss jemand Rat?
Ich habe auch schon versucht, die Variable @hosts mit our ganz oben im
package zu deklarieren, leider auch
ohne Erfolg. Hier meine package (gek=FCrzt)
--Schnipp
package DhcpParser;
[...]
use Parse::RecDescent;
[...]
sub new {
[...]
}
sub parseFile {
my $self =3D shift;
my %tmp =3D ();
my @hosts;
my $grammar =3D <<'EOGRAMMAR';
IDHOST : /[a-zA-Z-0-9]+/
IDMAC : /[a-fA-F0-9:]+/
IDIP : /[0-9.]+/
IDCOMMENT : /.*/
file : host(s?)
host : /^host/ IDHOST
{
$::tmp{'name'} =3D $item[2];
}
/{/ comment(?) option(s?) terminator(1)
comment : <skip: qr/[ \t]*/> word(s?) newline
word : /#/ IDCOMMENT
{
$::tmp{'comment'} =3D $item[2];
}
newline : /\n/
option : mac | ip | other
mac : /hardware ethernet/ IDMAC /;/
{
$::tmp{'mac'} =3D $item[2];
}
ip : /fixed-address/ IDIP /;/
{
$::tmp{'ip'} =3D $item[2];
}
other : /[^}]/
terminator : /}/
{
push(@::hosts, {
'name' =3D> $::tmp{'name'},
'comment' =3D> $::tmp{'comment'},
'mac' =3D> $::tmp{'mac'},
'ip' =3D> $::tmp{'ip'} }
);
%::tmp =3D ();
}
EOGRAMMAR
my $parse =3D new Parse::RecDescent($grammar);
# Datei einlesen
my $text;
open( IN, "<" . $self->{FILENAME} ) or die "Fehler: parseFile: ($!)";
while (<IN>) {
next if ( $_ =3D~ /^#/ || $_ =3D~ /^\s+$/ );
$text .=3D $_;
}
close(IN);
my $tree =3D $parse->file($text);
if (not $tree) {
exit 1;
} else {
my $cnt=3D (@hosts); # <-- @hosts ist hier leer (im Kontext der
Grammatik allerdings nicht)
print $cnt, "\n";
}
[...]
}
[...]
1;
--Schnapp
Danke und Gru=DF,
Martin
------------------------------
Date: Tue, 5 Jan 2010 03:53:37 -0800 (PST)
From: Martin Bley <martinbley@yahoo.de>
Subject: Re: Parse::RecDescent erreichbarkeit von Variablen
Message-Id: <a51e8109-656f-4400-aaac-8facb26cc505@v25g2000yqk.googlegroups.com>
Hi folks,
sorry for posting in german - I didn't mention the missing 'de' prior
the groupname.
My problem points to variables used inside the grammar in the method
parseFile().
I'm not able to access the variable @hosts outside the grammar and
would like to
know, how to get the data out of the parsed file. Inside the grammar
@hosts is filled
with records, outside it is empty.
Documentation says, all variables are in context of Parse::RecDescent.
So how to
access them in there? Thank for any hints.
Regards,
Martin
------------------------------
Date: Tue, 05 Jan 2010 20:53:09 +0800
From: sreservoir <sreservoir@gmail.com>
Subject: Re: Parse::RecDescent erreichbarkeit von Variablen
Message-Id: <hhvcnm$vru$1@speranza.aioe.org>
On 1/5/2010 7:53 PM, Martin Bley wrote:
> Documentation says, all variables are in context of Parse::RecDescent.
> So how to
> access them in there? Thank for any hints.
If package-compiiled, then @P::RD::hosts should work; if lexical, then
you're out of luck.
Though usually, it's an input problem and you shouldn't be messing with
module internals.
------------------------------
Date: Tue, 5 Jan 2010 05:26:28 -0800 (PST)
From: Martin Bley <martinbley@yahoo.de>
Subject: Re: Parse::RecDescent erreichbarkeit von Variablen
Message-Id: <7e1e1773-653e-49c0-a7f4-d5c5dff6ed38@e27g2000yqd.googlegroups.com>
Hi,
> If package-compiiled, then @P::RD::hosts should work; if lexical, then
> you're out of luck.
>
> Though usually, it's an input problem and you shouldn't be messing with
> module internals.
I know, this is not clean code. I just don't get how to use the
parsed
values outside the Parse::RecDescent package. Right now, I declare
hosts
at the beginning of my package DhcpParser with
our @hosts;
This way I can access the variable via @::hosts outside the package.
How is
it done in a "clean" way?
Thanks,
Martin
------------------------------
Date: Tue, 05 Jan 2010 22:16:00 +0800
From: sreservoir <sreservoir@gmail.com>
Subject: Re: Parse::RecDescent erreichbarkeit von Variablen
Message-Id: <hhvhj1$7c1$2@speranza.aioe.org>
On 1/5/2010 9:26 PM, Martin Bley wrote:
> Hi,
>
>> If package-compiiled, then @P::RD::hosts should work; if lexical, then
>> you're out of luck.
>>
>> Though usually, it's an input problem and you shouldn't be messing with
>> module internals.
> I know, this is not clean code. I just don't get how to use the
> parsed
> values outside the Parse::RecDescent package. Right now, I declare
> hosts
> at the beginning of my package DhcpParser with
>
> our @hosts;
>
> This way I can access the variable via @::hosts outside the package.
> How is
> it done in a "clean" way?
usually, you write a function to return a ro copy of @hosts. But why
@::hosts if it's in the DhcpParser package? Try @DhcpParser::hosts?
------------------------------
Date: Tue, 05 Jan 2010 08:51:01 -0600
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Parse::RecDescent erreichbarkeit von Variablen
Message-Id: <87pr5ohaga.fsf@lifelogs.com>
On Tue, 5 Jan 2010 05:26:28 -0800 (PST) Martin Bley <martinbley@yahoo.de> wrote:
MB> I know, this is not clean code. I just don't get how to use the
MB> parsed values outside the Parse::RecDescent package. Right now, I
MB> declare hosts at the beginning of my package DhcpParser with our
MB> @hosts;
MB> This way I can access the variable via @::hosts outside the package.
MB> How is it done in a "clean" way?
This is pretty clean. Do your work inside a package, declare "our
@hosts" and then you'll have a nice clean @DhcpParser::hosts to use.
But I have two comments.
First, have you seen
http://search.cpan.org/~jhthorsen/Net-ISC-DHCPd-0.05/lib/Net/ISC/DHCPd.pm?
It may be useful and handles parsing the leases as well. Your MAC and
IP rules in particular can be improved, perhaps with Regexp::Common.
Generally when I write a P::RD parser I try to keep interaction with
global variables to a minimum. Sometimes it can't be avoided. In your
case, you do (as a summary): match A and set $tmp{A}, then B and set
$tmp{B}, then match a terminal and add the hash ref { A => $tmp{A}, B =>
$tmp{B} } to @hosts. This is not the best way to do it, though it may
work sometimes. What you want is:
# this rule will return an array ref to all the matches
all: match(s)
# this rule will return the hash ref you wanted to build
# you could also return \%item but you'll get unnecessary junk in there
# you could also return { A => $item[1], B => $item[2] } but you'd be
# hard-coding the positions; it may be necessary sometimes
match: A B terminal { $return = { A => $item{A}, B => $item{B} } }
Now, when you call the 'all' rule, you'll get an array ref to all the
matches. The external @hosts and %tmp are not needed.
$return is also nice as a way to indicate rule failure in code--you just
set it to undef. You can call an external function with the just-parsed
arguments, too.
You may also want to look at Hash::Merge to simplify your return values
and the <autotree> P::RD directive to build these hashes automatically
for you. <autotree> can be very verbose, though. I like it for
debugging but usually construct my own data structures in the end.
Ted
------------------------------
Date: Tue, 5 Jan 2010 14:50:05 +0000 (UTC)
From: "Keith R. Watson" <keith.watson@cc.gatech.edu>
Subject: Re: perl in BartPE: locale warning
Message-Id: <hhvjit$qnf$1@news-int2.gatech.edu>
Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote in
news:slrnhk2khf.ppg.nospam-abuse@powdermilk.math.berkeley.edu:
> I cannot manage to build BartPE in a way which allows perl (AS flavor)
> to run without warnings about (rephrasing):
>
> setting locale failed
> reverting to "C" locale
>
> Somebody knowing a workaround? Some environment missing, or do I need
> some more "language support" components?
>
> Thanks,
> Ilya
>
> P.S. I'm getting similar warnings from some other Unixish projects
> (e.g., Hugin)...
>
Ilya,
BartPE by default does not have locale information. You can use the
following plugin to add locale information to Windows XP:
http://www.cc.gatech.edu/~krwatson/files/locale_defaults.zip
The locale settings in the plugin are for the United States. If you need
the settings for a different locale you will need to find a system
configured the way you want, capture the registry settings, and edit the
Locale_Defaults.inf file.
The settings in the [Default.AddReg] section come from
HKEY_CURRENT_USER\Control Panel\International
The settings in the [SetupReg.AddReg] section come from
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Nls
Use RegEdit to export the registry settings to a .reg file then use the
following web site to convert the settings to the BartPE .inf file format.
http://vb.nl.eu.org/homepage/reg2peinf.aspx
You can get help with the BartPE .inf file format here:
http://www.nu2.nu/pebuilder/help/english/pluginformat.htm
keith
--
Keith R. Watson Georgia Institute of Technology
Systems Support Specialist IV College of Computing
keith.watson@cc.gatech.edu 801 Atlantic Drive NW
(404) 385-7401 Atlanta, GA 30332-0280
------------------------------
Date: Tue, 5 Jan 2010 15:38:24 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: perl in BartPE: locale warning
Message-Id: <slrnhk6n7g.1o8.nospam-abuse@powdermilk.math.berkeley.edu>
On 2010-01-05, Keith R. Watson <keith.watson@cc.gatech.edu> wrote:
> BartPE by default does not have locale information. You can use the
> following plugin to add locale information to Windows XP:
>
> http://www.cc.gatech.edu/~krwatson/files/locale_defaults.zip
A lot of thanks! I did not try it yet - I do not have BartPE-Builder
configured to run under BartPE yet, so would need to run real Windows
at some moment to rebuild...
> The locale settings in the plugin are for the United States. If you need
> the settings for a different locale you will need to find a system
> configured the way you want, capture the registry settings, and edit the
> Locale_Defaults.inf file.
>
> The settings in the [Default.AddReg] section come from
> HKEY_CURRENT_USER\Control Panel\International
>
> The settings in the [SetupReg.AddReg] section come from
> HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Nls
>
> Use RegEdit to export the registry settings to a .reg file then use the
> following web site to convert the settings to the BartPE .inf file format.
Why? Cannot BartPE "just load the .reg" file at runtime?
And, btw, would not BartPE-builder be able to emit .reg for a certain
subtree automatically?
Yours,
Ilya
------------------------------
Date: Tue, 5 Jan 2010 06:40:24 -0800 (PST)
From: "alexxx.magni@gmail.com" <alexxx.magni@gmail.com>
Subject: unicode newbie, can you help?
Message-Id: <0e2bbc7d-2d1e-4802-aa9c-d114843c1041@s31g2000yqs.googlegroups.com>
sorry if it's a naive question, but I never needed up to now to deal
with anything beyond a-zA-Z0-9....
now I have a long text with standard ascii and, sometimes, cyrillic
text - and I want to filter it out (the cyrillic, of course).
I tried with
perl -wne 'foreach($_){if (/(\p{InCyrillic})/){print"record $_ matches
>>>$1<<<\n"}else{print"ok\n"}}' test.htm
but it fails to recognize it - what am I doing wrong?
thanks for any help...
alessandro
------------------------------
Date: Tue, 05 Jan 2010 14:48:59 +0000
From: RedGrittyBrick <RedGrittyBrick@spamweary.invalid>
Subject: Re: unicode newbie, can you help?
Message-Id: <4b43515c$0$2535$da0feed9@news.zen.co.uk>
alexxx.magni@gmail.com wrote:
> sorry if it's a naive question, but I never needed up to now to deal
> with anything beyond a-zA-Z0-9....
>
> now I have a long text with standard ascii and, sometimes, cyrillic
> text - and I want to filter it out (the cyrillic, of course).
> I tried with
>
> perl -wne 'foreach($_){if (/(\p{InCyrillic})/){print"record $_ matches
>>>> $1<<<\n"}else{print"ok\n"}}' test.htm
>
> but it fails to recognize it - what am I doing wrong?
>
What you might be doing wrong is not telling perl which encoding is used
in test.html!
Your test.htm might be encoded in UTF-8, KO18(?) or something else. My
Perl installation might assume ISO-8859-1 and therefore not /see/ any
Cyrillic characters. YMMV
--
RGB
------------------------------
Date: Tue, 05 Jan 2010 07:15:36 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: unicode newbie, can you help?
Message-Id: <hdl6k51fpqesducv5b1uu2uff7ha42frsb@4ax.com>
"alexxx.magni@gmail.com" <alexxx.magni@gmail.com> wrote:
>sorry if it's a naive question, but I never needed up to now to deal
>with anything beyond a-zA-Z0-9....
Note: please remember latin resp. English characters are part of
Unicode, too.
>now I have a long text with standard ascii and, sometimes, cyrillic
>text - and I want to filter it out (the cyrillic, of course).
What specific encoding (charset, code page, ....) are you using and did
you tell Perl about that encoding or where you reading the text as byte
strings? Just saying "Unicode" is insufficient, because there are
several different enocdings for unicode, e.g. UTF-8, UTF-16, UCS-2 to
name just the most common.
jue
------------------------------
Date: Tue, 05 Jan 2010 16:30:42 +0100
From: "Jochen Lehmeier" <OJZGSRPBZVCX@spammotel.com>
To: "alexxx.magni@gmail.com" <alexxx.magni@gmail.com>
Subject: Re: unicode newbie, can you help?
Message-Id: <op.u52f1gxfmk9oye@frodo>
On Tue, 05 Jan 2010 15:40:24 +0100, alexxx.magni@gmail.com
<alexxx.magni@gmail.com> wrote:
> now I have a long text with standard ascii and, sometimes, cyrillic
> text - and I want to filter it out (the cyrillic, of course).
> I tried with
>
> perl -wne 'foreach($_){if (/(\p{InCyrillic})/){print"record $_ matches
>>>> $1<<<\n"}else{print"ok\n"}}' test.htm
>
> but it fails to recognize it - what am I doing wrong?
You are not telling Perl to expect utf8.
Try to add "use Encoding;" and "$_ = decode_utf8($_)" (and maybe "binmode
STDOUT,':utf8'" to avoid a warning "wide character..." while printing) at
the appropriate places; see "perldoc Encode" and "perldoc -f binmode" for
more details on this.
------------------------------
Date: Tue, 5 Jan 2010 07:58:56 -0800 (PST)
From: "alexxx.magni@gmail.com" <alexxx.magni@gmail.com>
Subject: Re: unicode newbie, can you help?
Message-Id: <4af387e6-9b8a-4099-ad9e-e4ab19aee432@l30g2000yqb.googlegroups.com>
On 5 Gen, 16:30, "Jochen Lehmeier" <OJZGSRPBZ...@spammotel.com> wrote:
> On Tue, 05 Jan 2010 15:40:24 +0100, alexxx.ma...@gmail.com =A0
>
> <alexxx.ma...@gmail.com> wrote:
> > now I have a long text with standard ascii and, sometimes, cyrillic
> > text - and I want to filter it out (the cyrillic, of course).
> > I tried with
>
> > perl -wne 'foreach($_){if (/(\p{InCyrillic})/){print"record $_ matches
> >>>> $1<<<\n"}else{print"ok\n"}}' test.htm
>
> > but it fails to recognize it - what am I doing wrong?
>
> You are not telling Perl to expect utf8.
>
> Try to add "use Encoding;" and "$_ =3D decode_utf8($_)" (and maybe "binmo=
de =A0
> STDOUT,':utf8'" to avoid a warning "wide character..." while printing) at=
=A0
> the appropriate places; see "perldoc Encode" and "perldoc -f binmode" for=
=A0
> more details on this.
wow, so many things I didnt know... there isnt any utility able to
detect the coding of a file ?
I tried your suggestion, but discovered I do not even have Encoding.pm
installed - I need to do a bit of homework I guess...
thanks!
alessandro
------------------------------
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:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#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 2752
***************************************