[31497] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2756 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 7 06:09:40 2010

Date: Thu, 7 Jan 2010 03:09:07 -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, 7 Jan 2010     Volume: 11 Number: 2756

Today's topics:
    Re: array reference and implicit creation (David Combs)
    Re: array reference and implicit creation <uri@StemSystems.com>
    Re: Determine physical location of IP <sysadmin@example.com>
    Re: FAQ 7.10 How do I adopt or take over a module alrea <pshendley@gmail.com>
    Re: FAQ 7.10 How do I adopt or take over a module alrea <uri@StemSystems.com>
    Re: FAQ 7.10 How do I adopt or take over a module alrea <sysadmin@example.com>
    Re: FAQ 7.10 How do I adopt or take over a module alrea <tadmc@seesig.invalid>
    Re: FAQ 7.10 How do I adopt or take over a module alrea <nospam-abuse@ilyaz.org>
    Re: LWP::UserAgent HTTP POST authentication problem <derykus@gmail.com>
    Re: LWP::UserAgent HTTP POST authentication problem <graham.stow@stowassocs.co.uk>
    Re: Perl DBI module hanging (transaction isolation) <xhoster@gmail.com>
    Re: translating an OS directory recursively into a tree (David Combs)
    Re: unicode newbie, can you help? <alexxx.magni@gmail.com>
    Re: unicode newbie, can you help? <alexxx.magni@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 6 Jan 2010 22:39:16 +0000 (UTC)
From: dkcombs@panix.com (David Combs)
Subject: Re: array reference and implicit creation
Message-Id: <hi33ek$et7$2@reader1.panix.com>

In article <87vdfvv4c9.fsf@quad.sysarch.com>,
Uri Guttman <uri@StemSystems.com> wrote:

You said you were going to again post your article
on autovivify.

WHERE?  Here in the group?


Also, from this very thread, looks like you and others
have seems some new aspects of autovivify, new hints
as to peering into it, datadumper too, maybe.

Just wondering -- any of this stuff going into your
article?


(Again, not asking for you to -- you probably have
zero spare time these days, just wondering IF you
were going to.)

Thanks!

David




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

Date: Wed, 06 Jan 2010 17:43:36 -0500
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: array reference and implicit creation
Message-Id: <873a2ij1lz.fsf@quad.sysarch.com>

>>>>> "DC" == David Combs <dkcombs@panix.com> writes:

  DC> In article <87vdfvv4c9.fsf@quad.sysarch.com>,
  DC> Uri Guttman <uri@StemSystems.com> wrote:

  DC> You said you were going to again post your article
  DC> on autovivify.

  DC> WHERE?  Here in the group?

ever heard of google? or google groups? i have posted the url for that
article many times.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: Wed, 06 Jan 2010 15:59:20 -0800
From: Wanna-Be Sys Admin <sysadmin@example.com>
Subject: Re: Determine physical location of IP
Message-Id: <st91n.2564$5m.2108@newsfe12.iad>

Jopa wrote:

> It would be impossible to figure out exact location, all you can ever
> get is a near guess
> which in most cases is reasonable. I live in the country and it gives
> me the nearest city.
> 

Exactly.  Mine shows me 800 miles away.  Unless the ISP dynamically
updates the list themselves and allows the public to see, it'd be
impossible, and not all ISP's would ever do it.  Geo IP doesn't hurt,
but it can really not help a lot either.
-- 
Not really a wanna-be, but I don't know everything.


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

Date: Wed, 6 Jan 2010 15:17:55 -0800 (PST)
From: Sherm Pendley <pshendley@gmail.com>
Subject: Re: FAQ 7.10 How do I adopt or take over a module already on CPAN?
Message-Id: <b304668e-6b8e-4893-bef5-2c4a235b14f3@r24g2000yqd.googlegroups.com>

On Jan 6, 11:00=A0am, PerlFAQ Server <br...@theperlreview.com> wrote:
> This is an excerpt from the latest version perlfaq7.pod, which
> comes with the standard Perl distribution. These postings aim to
> reduce the number of repeated questions as well as allow the community
> to review and update the answers. The latest version of the complete
> perlfaq is athttp://faq.perl.org.
>
> --------------------------------------------------------------------
>
> 7.10: How do I adopt or take over a module already on CPAN?
>
> =A0 =A0 (contributed by brian d foy)
>
> =A0 =A0 The easiest way to take over a module is to have the current modu=
le
> =A0 =A0 maintainer either make you a co-maintainer or transfer the module=
 to
> =A0 =A0 you.
>
> =A0 =A0 If you can't reach the author for some reason (e.g. email bounces=
), the
> =A0 =A0 PAUSE admins at modu...@perl.org can help. The PAUSE admins treat=
 each
> =A0 =A0 case individually.
>
> =A0 =A0 * =A0 Get a login for the Perl Authors Upload Server (PAUSE) if y=
ou don't
> =A0 =A0 =A0 =A0 already have one:http://pause.perl.org
>
> =A0 =A0 * =A0 Write to modu...@perl.org explaining what you did to contac=
t the
> =A0 =A0 =A0 =A0 current maintainer. The PAUSE admins will also try to rea=
ch the
> =A0 =A0 =A0 =A0 maintainer.
>
> =A0 =A0 * =A0 Post a public message in a heavily trafficked site announci=
ng your
> =A0 =A0 =A0 =A0 intention to take over the module.
>
> =A0 =A0 * =A0 Wait a bit. The PAUSE admins don't want to act too quickly =
in case
> =A0 =A0 =A0 =A0 the current maintainer is on holiday. If there's no respo=
nse to
> =A0 =A0 =A0 =A0 private communication or the public post, a PAUSE admin c=
an transfer
> =A0 =A0 =A0 =A0 it to you.
>
> --------------------------------------------------------------------
>
> The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
> are not necessarily experts in every domain where Perl might show up,
> so please include as much information as possible and relevant in any
> corrections. The perlfaq-workers also don't have access to every
> operating system or platform, so please include relevant details for
> corrections to examples that do not work on particular platforms.
> Working code is greatly appreciated.
>
> If you'd like to help maintain the perlfaq, see the details in
> perlfaq.pod.

Send this Republican nonsense elsewhere.

sherm--


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

Date: Wed, 06 Jan 2010 19:13:25 -0500
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: FAQ 7.10 How do I adopt or take over a module already on CPAN?
Message-Id: <87skaihivu.fsf@quad.sysarch.com>

>>>>> "SP" == Sherm Pendley <pshendley@gmail.com> writes:

  SP> On Jan 6, 11:00 am, PerlFAQ Server <br...@theperlreview.com> wrote:

  >> If you'd like to help maintain the perlfaq, see the details in
  >> perlfaq.pod.

  SP> Send this Republican nonsense elsewhere.

huh??

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: Wed, 06 Jan 2010 17:53:56 -0800
From: Wanna-Be Sys Admin <sysadmin@example.com>
Subject: Re: FAQ 7.10 How do I adopt or take over a module already on CPAN?
Message-Id: <V8b1n.1334$rH7.1167@newsfe19.iad>

Sherm Pendley wrote:

 ....
> 
> Send this Republican nonsense elsewhere.
> 
> sherm--

Did you reply to the wrong post, or did you take the instructions the
wrong way?  It didn't say anyone could take over a module, just that
there are options for people to take control of maintenance if it's
been abandoned or the author doesn't want to be responsible for updates
or the like anymore. They're not going to just pause without
justification.  It's also a method to have it paused if it's a module
in CPAN that's seriously out of date or insecure, unless someone takes
it over or the author updates it, so it's good for house keeping, too. 
I don't see the issue, but perhaps you've replied to the wrong post?
-- 
Not really a wanna-be, but I don't know everything.


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

Date: Wed, 06 Jan 2010 20:33:49 -0600
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: FAQ 7.10 How do I adopt or take over a module already on CPAN?
Message-Id: <slrnhkahqf.bpu.tadmc@tadbox.sbcglobal.net>

Uri Guttman <uri@StemSystems.com> wrote:
>>>>>> "SP" == Sherm Pendley <pshendley@gmail.com> writes:
                              ^^
                              ^^
>  SP> On Jan 6, 11:00 am, PerlFAQ Server <br...@theperlreview.com> wrote:
>
>  >> If you'd like to help maintain the perlfaq, see the details in
>  >> perlfaq.pod.
>
>  SP> Send this Republican nonsense elsewhere.
>
> huh??


My guess is that this poster is not the real Sherm.

Most of his recent posts where from spamtrap@shermpendley.com.

We are being trolled.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"


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

Date: Thu, 7 Jan 2010 06:25:11 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: FAQ 7.10 How do I adopt or take over a module already on CPAN?
Message-Id: <slrnhkavi6.7re.nospam-abuse@powdermilk.math.berkeley.edu>

On 2010-01-06, PerlFAQ Server <brian@theperlreview.com> wrote:
> 7.10: How do I adopt or take over a module already on CPAN?
>
>     (contributed by brian d foy)
>
>     The easiest way to take over a module is to have the current module
>     maintainer either make you a co-maintainer or transfer the module to
>     you.
>
>     If you can't reach the author for some reason (e.g. email bounces), the
>     PAUSE admins at modules@perl.org can help. The PAUSE admins treat each
>     case individually.

Nowadays there is an alternative (but more cumbersome) way to improve
someone else's modules: maintain patches as a part of your own
`bundle', so that people can use CPAN.pm's auto-patching abilities.

(I'm still in negotiations with Andreas to make the distribution
pathway for such patches more streamlined.  This part of my original
edit of CPAN.pm did not make it into the current version of CPAN.pm...)

Ilya


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

Date: Wed, 6 Jan 2010 18:13:37 -0800 (PST)
From: "C.DeRykus" <derykus@gmail.com>
Subject: Re: LWP::UserAgent HTTP POST authentication problem
Message-Id: <d0499caa-19a9-4394-9410-0931f735192c@26g2000yqo.googlegroups.com>

On Jan 6, 10:04=A0am, "Graham" <graham.s...@stowassocs.co.uk> wrote:
> Below is a suggested 'Automatic Payment Confirmation' script copied and
> pasted from the Nochex Developer's forum (Nochex themselves do not offer
> support in Perl). This thread is now closed and I suspect the Nochex foru=
m
> does not get much traffic, hence this post here. I have spotted one error
> (the line '$mail_method =3D "sendmail";' needs to be added if using sendm=
ail).
> However, even with this correction, the script always goes down the first=
 of
> the four 'if (res->' options (i.e. (res->is_error)), and thus none of my
> test transactions are being authorised, which makes me suspect that there=
 is
> something wrong with the following lines:-

> ...

I notice that you didn't get status to confirm that
res->is_error is returning a 401 authorization error...

> if ($res->is_error) {
>   $subject =3D "Perl APC Script Error - ... ";
>   $message =3D "Your Perl APC script was called .

    $status =3D $res->status_line;   # confirm actual error

  } elsif {
  ...


Also:  use LWP::Debug qw/+/;  # add debug trace as needed

--
Charles DeRykus


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

Date: Thu, 7 Jan 2010 09:46:49 -0000
From: "Graham" <graham.stow@stowassocs.co.uk>
Subject: Re: LWP::UserAgent HTTP POST authentication problem
Message-Id: <LOGdnWVtzJENMNjWnZ2dnUVZ8lednZ2d@bt.com>


"C.DeRykus" <derykus@gmail.com> wrote in message 
news:d0499caa-19a9-4394-9410-0931f735192c@26g2000yqo.googlegroups.com...
On Jan 6, 10:04 am, "Graham" <graham.s...@stowassocs.co.uk> wrote:
> Below is a suggested 'Automatic Payment Confirmation' script copied and
> pasted from the Nochex Developer's forum (Nochex themselves do not offer
> support in Perl). This thread is now closed and I suspect the Nochex forum
> does not get much traffic, hence this post here. I have spotted one error
> (the line '$mail_method = "sendmail";' needs to be added if using 
> sendmail).
> However, even with this correction, the script always goes down the first 
> of
> the four 'if (res->' options (i.e. (res->is_error)), and thus none of my
> test transactions are being authorised, which makes me suspect that there 
> is
> something wrong with the following lines:-

> ...

I notice that you didn't get status to confirm that
res->is_error is returning a 401 authorization error...

> if ($res->is_error) {
>   $subject = "Perl APC Script Error - ... ";
>   $message = "Your Perl APC script was called .

    $status = $res->status_line;   # confirm actual error

  } elsif {
  ...


Also:  use LWP::Debug qw/+/;  # add debug trace as needed

--
Charles DeRykus


I've added '$status = $res->status;' line where suggested, and have also 
added the lines '$response_as_string = $res->as_string;' and '$error_as_html 
= $res->error_as_HTML;'. When I print these, I get the following output:-
----------------------------------------------------------------------
response_as_string = HTTP/1.1 411 Length Required
Connection: close
Date: Thu, 07 Jan 2010 09:32:22 GMT
Content-Length: 24
Content-Type: text/html
Client-Date: Thu, 07 Jan 2010 09:32:19 GMT
Client-Peer: [REMOVED FOR SECURITY]
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=Equifax/OU=Equifax Secure Certificate 
Authority
Client-SSL-Cert-Subject: /C=GB/ST=West Yorkshire/L=Leeds/O=Nochex 
Ltd/OU=GB/CN=www.nochex.com
Client-SSL-Cipher: RC4-MD5
Client-SSL-Warning: Peer certificate not verified

<h1>Length Required</h1>error_as_html = <HTML>
<HEAD><TITLE>An Error Occurred</TITLE></HEAD>
<BODY>
<H1>An Error Occurred</H1>
411 Length Required
</BODY>
</HTML>
status = 411 Length 
Required-----------------------------------------------So it appears that a 
length is required. It may be a stupid question, but a length of what, and 
how should I provide it within the following code?use LWP::UserAgent;$ua = 
new LWP::UserAgent;$req = new HTTP::Request('POST', 
'https://www.nochex.com/nochex.dll/apc/apc');$req->content_type("application/x-www-form-urlencoded");$req->content($query);$res 
= $ua->request($req);




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

Date: Wed, 06 Jan 2010 19:12:42 -0800
From: Xho Jingleheimerschmidt <xhoster@gmail.com>
Subject: Re: Perl DBI module hanging (transaction isolation)
Message-Id: <4b455622$0$4936$ed362ca5@nr5-q3a.newsreader.com>

dn.perl@gmail.com wrote:
> I am running a perl script (on ancient Perl 5.6, with which I am
> stuck) which uses DBI module. The script runs  select, delete and
> insert statements against an Oracle table. The script runs properly
> most of the time.

Your definition of "properly" is improper.

> I also have a 'sqlplus' session running.
> There are 5 records in table tt22.
> 
> Case A)
> In sqlplus session: I delete all the 5 records from the table; issue a
> 'commit', and run the perl script. It runs fine.
> 
> Case B)
> In sqlplus session, I delete all the 5 records from the table but do
> not run commit.
> Then I run the perl script but it hangs.
> I issue 'commit' via sqlplus, and the 'hanging' perl script starts
> running at once.
> 
> I do not want my perl script to hang. Is it possible to set a
> transaction isolation level via DBI (perhaps immediately after
> connecting to the database  DBI->connect) which will enable the perl
> script to run smoothly even when I have deleted some records in the
> sqlplus session without commiting the delete action.

No.  Oracle does not work that way.  You may be able to do something 
with the "skip locked", I think it is called.  But that will probably do 
more harm than good.

Maybe you can set autocommit to on in sqlplus.

But why you have a burning desire to achieve data corruption is beyond 
me.  Maybe you can switch to a database that specializes in corrupting 
your data.

Xho



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

Date: Wed, 6 Jan 2010 22:56:32 +0000 (UTC)
From: dkcombs@panix.com (David Combs)
Subject: Re: translating an OS directory recursively into a tree object
Message-Id: <hi34f0$9t8$1@reader1.panix.com>

In article <slrnhhq479.17h.tadmc@tadbox.sbcglobal.net>,
Tad McClellan  <tadmc@seesig.invalid> wrote:
>Mathematisch <mathematisch@gmail.com> wrote:
>
>> Would someone please show how to create a tree data structure by using
>> an OS directory as input.
>
>
>This probably won't help you solve your problem, but whenever the
>subject of parsing directory trees comes up, I just must share it.
>
>Got this off the 'net over a decade ago...
>
>    find . -print | sed -e 's,[^/]*/\([^/]*\)$,`--\1,' -e 's,[^/]*/,|  ,g'
>
>Simply amazing.
>
>
>-- 
>Tad McClellan
>email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


If you have the spare time -- uh -- you could save a whole bunch
of us the (considerable?) effort of trying to figure out exactly how it
works.

   Nor am I so sure that I *could* do it.  :-(

(No demand, there, of course -- you're ALREADY giving 
enormous amouts of time and brain-power to this group!)


Thanks,

David




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

Date: Thu, 7 Jan 2010 00:51:57 -0800 (PST)
From: "alexxx.magni@gmail.com" <alexxx.magni@gmail.com>
Subject: Re: unicode newbie, can you help?
Message-Id: <184a9eb7-8c4b-46d8-b479-bacb8daac5e7@f5g2000yqh.googlegroups.com>

On 5 Gen, 19:45, s...@netherlands.com wrote:
> On Tue, 5 Jan 2010 06:40:24 -0800 (PST), "alexxx.ma...@gmail.com" <alexxx=
 .ma...@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?
>
> >thanks for any help...
>
> >alessandro
>
> Try this on your file and post the output.
> Assign $fname =3D 'your file' and run it.
>
> -sln
>
> # File: bomtest.pl
> #
> (snip snip)
>


here is the output...

thank! Did you write this?

alessandro
----------------------------------------------

NOT WRITING to test.htm !!
--------------------

Reading test.htm as ''
--------------------
UTF Check, guess(100): ascii. Do nothing .. unix perlio
Get_BOM() - Layers =3D unix perlio
 * Reading up to 4 characters
     - char 3c , bytes =3D 1
     - char 68 , bytes =3D 1
     - char 74 , bytes =3D 1
     - char 6d , bytes =3D 1
     - Read 4 characters. Position =3D 4
     - Sample (4) =3D 3c  68  74  6d
 * Analysing bytes
     BOMS avail =3D ( fffe0000 ) ( 0000feff ) ( efbbbf ) ( fffe )
( feff )
     - Bom bytes from sample (4) =3D 3c  68  74  6d
 * BOM Not found
Get_BOM returned , , , 0

Pass 1:  seek 0/0 ok, data (332) =3D 3c  68  74  6d  6c  3e  3c  68  65
61  64  3e  3c  6d  65  74  61  20  68  74  74  70  2d  65  71  75
69  76  3d  22  43  6f  6e  74  65  6e  74  2d  54  79  70  65  22
20  63  6f  6e  74  65  6e  74  3d  22  74  65  78  74  2f  68  74
6d  6c  3b  20  63  68  61  72  73  65  74  3d  55  54  46  2d  38
22  20  2f  3e  3c  74  69  74  6c  65  3e  67  20  2d  20  5b  33
34  6d  7e  41  5b  33  34  6d  7e  42  5b  33  34  6d  7e  40  d0
b0  d0  bd  d0  b8  5b  33  34  6d  7e  46  d0  b0  20  30  3c  2f
74  69  74  6c  65  3e  3c  2f  68  65  61  64  3e  3c  62  6f  64
79  3e  3c  61  20  68  72  65  65  78  2e  68  74  6d  6c  22  20
73  74  79  6c  65  3d  22  63  6f  6c  6f  72  3a  23  30  30  30
30  30  30  22  3e  d0  b2  d0  b2  d0  b5  5b  33  34  6d  7e  40
5b  33  34  6d  7e  45  3c  2f  61  3e  3c  62  72  3e  3c  62  72
3e  3c  62  3e  d0  a1  5b  33  34  6d  7e  42  5b  33  34  6d  7e
40  d0  b0  d0  bd  d0  b8  5b  33  34  6d  7e  46  d0  b0  20  30
3c  2f  62  3e  3c  74  61  62  6c  65  3e  3c  74  62  6f  64  79
3e  3c  74  72  20  62  67  63  6f  6c  6f  72  3d  22  23  30  30
30  30  30  30  22  20  73  74  79  6c  65  3d  22  63  6f  6c  6f
72  3a  23  66  66  66  66  66  66  22  3e  3c  74  64  20  77  69
64  3e  3c  62  3e  49  44  3c  2f  62  3e  3c  2f  74  64  3e  a
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html;
charset=3DUTF-8" /><title>g - [34m~A[34m~B[34m~@=D0=B0=D0=BD=D0=B8[34m~F=D0=
=B0 0</
title></head><body><a hreex.html" style=3D"color:#000000">=D0=B2=D0=B2=D0=
=B5[34m~@
[34m~E</a><br><br><b>=D0=A1[34m~B[34m~@=D0=B0=D0=BD=D0=B8[34m~F=D0=B0 0</
b><table><tbody><tr bgcolor=3D"#000000" style=3D"color:#ffffff"><td
wid><b>ID</b></td>

Pass 2:  seek 0/0 ok, data (332) =3D 3c  68  74  6d  6c  3e  3c  68  65
61  64  3e  3c  6d  65  74  61  20  68  74  74  70  2d  65  71  75
69  76  3d  22  43  6f  6e  74  65  6e  74  2d  54  79  70  65  22
20  63  6f  6e  74  65  6e  74  3d  22  74  65  78  74  2f  68  74
6d  6c  3b  20  63  68  61  72  73  65  74  3d  55  54  46  2d  38
22  20  2f  3e  3c  74  69  74  6c  65  3e  67  20  2d  20  5b  33
34  6d  7e  41  5b  33  34  6d  7e  42  5b  33  34  6d  7e  40  d0
b0  d0  bd  d0  b8  5b  33  34  6d  7e  46  d0  b0  20  30  3c  2f
74  69  74  6c  65  3e  3c  2f  68  65  61  64  3e  3c  62  6f  64
79  3e  3c  61  20  68  72  65  65  78  2e  68  74  6d  6c  22  20
73  74  79  6c  65  3d  22  63  6f  6c  6f  72  3a  23  30  30  30
30  30  30  22  3e  d0  b2  d0  b2  d0  b5  5b  33  34  6d  7e  40
5b  33  34  6d  7e  45  3c  2f  61  3e  3c  62  72  3e  3c  62  72
3e  3c  62  3e  d0  a1  5b  33  34  6d  7e  42  5b  33  34  6d  7e
40  d0  b0  d0  bd  d0  b8  5b  33  34  6d  7e  46  d0  b0  20  30
3c  2f  62  3e  3c  74  61  62  6c  65  3e  3c  74  62  6f  64  79
3e  3c  74  72  20  62  67  63  6f  6c  6f  72  3d  22  23  30  30
30  30  30  30  22  20  73  74  79  6c  65  3d  22  63  6f  6c  6f
72  3a  23  66  66  66  66  66  66  22  3e  3c  74  64  20  77  69
64  3e  3c  62  3e  49  44  3c  2f  62  3e  3c  2f  74  64  3e  a
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html;
charset=3DUTF-8" /><title>g - [34m~A[34m~B[34m~@=D0=B0=D0=BD=D0=B8[34m~F=D0=
=B0 0</
title></head><body><a hreex.html" style=3D"color:#000000">=D0=B2=D0=B2=D0=
=B5[34m~@
[34m~E</a><br><br><b>=D0=A1[34m~B[34m~@=D0=B0=D0=BD=D0=B8[34m~F=D0=B0 0</
b><table><tbody><tr bgcolor=3D"#000000" style=3D"color:#ffffff"><td
wid><b>ID</b></td>

Pass 3:  seek 0/0 ok, data (332) =3D 3c  68  74  6d  6c  3e  3c  68  65
61  64  3e  3c  6d  65  74  61  20  68  74  74  70  2d  65  71  75
69  76  3d  22  43  6f  6e  74  65  6e  74  2d  54  79  70  65  22
20  63  6f  6e  74  65  6e  74  3d  22  74  65  78  74  2f  68  74
6d  6c  3b  20  63  68  61  72  73  65  74  3d  55  54  46  2d  38
22  20  2f  3e  3c  74  69  74  6c  65  3e  67  20  2d  20  5b  33
34  6d  7e  41  5b  33  34  6d  7e  42  5b  33  34  6d  7e  40  d0
b0  d0  bd  d0  b8  5b  33  34  6d  7e  46  d0  b0  20  30  3c  2f
74  69  74  6c  65  3e  3c  2f  68  65  61  64  3e  3c  62  6f  64
79  3e  3c  61  20  68  72  65  65  78  2e  68  74  6d  6c  22  20
73  74  79  6c  65  3d  22  63  6f  6c  6f  72  3a  23  30  30  30
30  30  30  22  3e  d0  b2  d0  b2  d0  b5  5b  33  34  6d  7e  40
5b  33  34  6d  7e  45  3c  2f  61  3e  3c  62  72  3e  3c  62  72
3e  3c  62  3e  d0  a1  5b  33  34  6d  7e  42  5b  33  34  6d  7e
40  d0  b0  d0  bd  d0  b8  5b  33  34  6d  7e  46  d0  b0  20  30
3c  2f  62  3e  3c  74  61  62  6c  65  3e  3c  74  62  6f  64  79
3e  3c  74  72  20  62  67  63  6f  6c  6f  72  3d  22  23  30  30
30  30  30  30  22  20  73  74  79  6c  65  3d  22  63  6f  6c  6f
72  3a  23  66  66  66  66  66  66  22  3e  3c  74  64  20  77  69
64  3e  3c  62  3e  49  44  3c  2f  62  3e  3c  2f  74  64  3e  a
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html;
charset=3DUTF-8" /><title>g - [34m~A[34m~B[34m~@=D0=B0=D0=BD=D0=B8[34m~F=D0=
=B0 0</
title></head><body><a hreex.html" style=3D"color:#000000">=D0=B2=D0=B2=D0=
=B5[34m~@
[34m~E</a><br><br><b>=D0=A1[34m~B[34m~@=D0=B0=D0=BD=D0=B8[34m~F=D0=B0 0</
b><table><tbody><tr bgcolor=3D"#000000" style=3D"color:#ffffff"><td
wid><b>ID</b></td>


Buffering test.htm as '', open/read buffer as ':utf8'
--------------------
UTF Check, guess(100): ascii. Do nothing .. unix perlio
Get_BOM() - Layers =3D unix perlio
 * Reading up to 4 characters
     - char 3c , bytes =3D 1
     - char 68 , bytes =3D 1
     - char 74 , bytes =3D 1
     - char 6d , bytes =3D 1
     - Read 4 characters. Position =3D 4
     - Sample (4) =3D 3c  68  74  6d
 * Analysing bytes
     BOMS avail =3D ( fffe0000 ) ( 0000feff ) ( efbbbf ) ( fffe )
( feff )
     - Bom bytes from sample (4) =3D 3c  68  74  6d
 * BOM Not found
Get_BOM returned , , , 0

Pass 1:  seek 0/0 ok, data (320) =3D 3c  68  74  6d  6c  3e  3c  68  65
61  64  3e  3c  6d  65  74  61  20  68  74  74  70  2d  65  71  75
69  76  3d  22  43  6f  6e  74  65  6e  74  2d  54  79  70  65  22
20  63  6f  6e  74  65  6e  74  3d  22  74  65  78  74  2f  68  74
6d  6c  3b  20  63  68  61  72  73  65  74  3d  55  54  46  2d  38
22  20  2f  3e  3c  74  69  74  6c  65  3e  67  20  2d  20  5b  33
34  6d  7e  41  5b  33  34  6d  7e  42  5b  33  34  6d  7e  40  430
43d  438  5b  33  34  6d  7e  46  430  20  30  3c  2f  74  69  74  6c
65  3e  3c  2f  68  65  61  64  3e  3c  62  6f  64  79  3e  3c  61
20  68  72  65  65  78  2e  68  74  6d  6c  22  20  73  74  79  6c
65  3d  22  63  6f  6c  6f  72  3a  23  30  30  30  30  30  30  22
3e  432  432  435  5b  33  34  6d  7e  40  5b  33  34  6d  7e  45  3c
2f  61  3e  3c  62  72  3e  3c  62  72  3e  3c  62  3e  421  5b  33
34  6d  7e  42  5b  33  34  6d  7e  40  430  43d  438  5b  33  34  6d
7e  46  430  20  30  3c  2f  62  3e  3c  74  61  62  6c  65  3e  3c
74  62  6f  64  79  3e  3c  74  72  20  62  67  63  6f  6c  6f  72
3d  22  23  30  30  30  30  30  30  22  20  73  74  79  6c  65  3d
22  63  6f  6c  6f  72  3a  23  66  66  66  66  66  66  22  3e  3c
74  64  20  77  69  64  3e  3c  62  3e  49  44  3c  2f  62  3e  3c
2f  74  64  3e  a
Pass 2:  seek 0/0 ok, data (320) =3D 3c  68  74  6d  6c  3e  3c  68  65
61  64  3e  3c  6d  65  74  61  20  68  74  74  70  2d  65  71  75
69  76  3d  22  43  6f  6e  74  65  6e  74  2d  54  79  70  65  22
20  63  6f  6e  74  65  6e  74  3d  22  74  65  78  74  2f  68  74
6d  6c  3b  20  63  68  61  72  73  65  74  3d  55  54  46  2d  38
22  20  2f  3e  3c  74  69  74  6c  65  3e  67  20  2d  20  5b  33
34  6d  7e  41  5b  33  34  6d  7e  42  5b  33  34  6d  7e  40  430
43d  438  5b  33  34  6d  7e  46  430  20  30  3c  2f  74  69  74  6c
65  3e  3c  2f  68  65  61  64  3e  3c  62  6f  64  79  3e  3c  61
20  68  72  65  65  78  2e  68  74  6d  6c  22  20  73  74  79  6c
65  3d  22  63  6f  6c  6f  72  3a  23  30  30  30  30  30  30  22
3e  432  432  435  5b  33  34  6d  7e  40  5b  33  34  6d  7e  45  3c
2f  61  3e  3c  62  72  3e  3c  62  72  3e  3c  62  3e  421  5b  33
34  6d  7e  42  5b  33  34  6d  7e  40  430  43d  438  5b  33  34  6d
7e  46  430  20  30  3c  2f  62  3e  3c  74  61  62  6c  65  3e  3c
74  62  6f  64  79  3e  3c  74  72  20  62  67  63  6f  6c  6f  72
3d  22  23  30  30  30  30  30  30  22  20  73  74  79  6c  65  3d
22  63  6f  6c  6f  72  3a  23  66  66  66  66  66  66  22  3e  3c
74  64  20  77  69  64  3e  3c  62  3e  49  44  3c  2f  62  3e  3c
2f  74  64  3e  a
Pass 3:  seek 0/0 ok, data (320) =3D 3c  68  74  6d  6c  3e  3c  68  65
61  64  3e  3c  6d  65  74  61  20  68  74  74  70  2d  65  71  75
69  76  3d  22  43  6f  6e  74  65  6e  74  2d  54  79  70  65  22
20  63  6f  6e  74  65  6e  74  3d  22  74  65  78  74  2f  68  74
6d  6c  3b  20  63  68  61  72  73  65  74  3d  55  54  46  2d  38
22  20  2f  3e  3c  74  69  74  6c  65  3e  67  20  2d  20  5b  33
34  6d  7e  41  5b  33  34  6d  7e  42  5b  33  34  6d  7e  40  430
43d  438  5b  33  34  6d  7e  46  430  20  30  3c  2f  74  69  74  6c
65  3e  3c  2f  68  65  61  64  3e  3c  62  6f  64  79  3e  3c  61
20  68  72  65  65  78  2e  68  74  6d  6c  22  20  73  74  79  6c
65  3d  22  63  6f  6c  6f  72  3a  23  30  30  30  30  30  30  22
3e  432  432  435  5b  33  34  6d  7e  40  5b  33  34  6d  7e  45  3c
2f  61  3e  3c  62  72  3e  3c  62  72  3e  3c  62  3e  421  5b  33
34  6d  7e  42  5b  33  34  6d  7e  40  430  43d  438  5b  33  34  6d
7e  46  430  20  30  3c  2f  62  3e  3c  74  61  62  6c  65  3e  3c
74  62  6f  64  79  3e  3c  74  72  20  62  67  63  6f  6c  6f  72
3d  22  23  30  30  30  30  30  30  22  20  73  74  79  6c  65  3d
22  63  6f  6c  6f  72  3a  23  66  66  66  66  66  66  22  3e  3c
74  64  20  77  69  64  3e  3c  62  3e  49  44  3c  2f  62  3e  3c
2f  74  64  3e  a

Reading test.htm as bytes
--------------------
Pass 1:  seek 0/0 ok, data (332) =3D   3c  68  74  6d  6c  3e  3c  68
65  61  64  3e  3c  6d  65  74  61  20  68  74  74  70  2d  65  71
75  69  76  3d  22  43  6f  6e  74  65  6e  74  2d  54  79  70  65
22  20  63  6f  6e  74  65  6e  74  3d  22  74  65  78  74  2f  68
74  6d  6c  3b  20  63  68  61  72  73  65  74  3d  55  54  46  2d
38  22  20  2f  3e  3c  74  69  74  6c  65  3e  67  20  2d  20  5b
33  34  6d  7e  41  5b  33  34  6d  7e  42  5b  33  34  6d  7e  40
d0  b0  d0  bd  d0  b8  5b  33  34  6d  7e  46  d0  b0  20  30  3c
2f  74  69  74  6c  65  3e  3c  2f  68  65  61  64  3e  3c  62  6f
64  79  3e  3c  61  20  68  72  65  65  78  2e  68  74  6d  6c  22
20  73  74  79  6c  65  3d  22  63  6f  6c  6f  72  3a  23  30  30
30  30  30  30  22  3e  d0  b2  d0  b2  d0  b5  5b  33  34  6d  7e
40  5b  33  34  6d  7e  45  3c  2f  61  3e  3c  62  72  3e  3c  62
72  3e  3c  62  3e  d0  a1  5b  33  34  6d  7e  42  5b  33  34  6d
7e  40  d0  b0  d0  bd  d0  b8  5b  33  34  6d  7e  46  d0  b0  20
30  3c  2f  62  3e  3c  74  61  62  6c  65  3e  3c  74  62  6f  64
79  3e  3c  74  72  20  62  67  63  6f  6c  6f  72  3d  22  23  30
30  30  30  30  30  22  20  73  74  79  6c  65  3d  22  63  6f  6c
6f  72  3a  23  66  66  66  66  66  66  22  3e  3c  74  64  20  77
69  64  3e  3c  62  3e  49  44  3c  2f  62  3e  3c  2f  74  64  3e
a
Pass 2:  seek 0/0 ok, data (332) =3D   3c  68  74  6d  6c  3e  3c  68
65  61  64  3e  3c  6d  65  74  61  20  68  74  74  70  2d  65  71
75  69  76  3d  22  43  6f  6e  74  65  6e  74  2d  54  79  70  65
22  20  63  6f  6e  74  65  6e  74  3d  22  74  65  78  74  2f  68
74  6d  6c  3b  20  63  68  61  72  73  65  74  3d  55  54  46  2d
38  22  20  2f  3e  3c  74  69  74  6c  65  3e  67  20  2d  20  5b
33  34  6d  7e  41  5b  33  34  6d  7e  42  5b  33  34  6d  7e  40
d0  b0  d0  bd  d0  b8  5b  33  34  6d  7e  46  d0  b0  20  30  3c
2f  74  69  74  6c  65  3e  3c  2f  68  65  61  64  3e  3c  62  6f
64  79  3e  3c  61  20  68  72  65  65  78  2e  68  74  6d  6c  22
20  73  74  79  6c  65  3d  22  63  6f  6c  6f  72  3a  23  30  30
30  30  30  30  22  3e  d0  b2  d0  b2  d0  b5  5b  33  34  6d  7e
40  5b  33  34  6d  7e  45  3c  2f  61  3e  3c  62  72  3e  3c  62
72  3e  3c  62  3e  d0  a1  5b  33  34  6d  7e  42  5b  33  34  6d
7e  40  d0  b0  d0  bd  d0  b8  5b  33  34  6d  7e  46  d0  b0  20
30  3c  2f  62  3e  3c  74  61  62  6c  65  3e  3c  74  62  6f  64
79  3e  3c  74  72  20  62  67  63  6f  6c  6f  72  3d  22  23  30
30  30  30  30  30  22  20  73  74  79  6c  65  3d  22  63  6f  6c
6f  72  3a  23  66  66  66  66  66  66  22  3e  3c  74  64  20  77
69  64  3e  3c  62  3e  49  44  3c  2f  62  3e  3c  2f  74  64  3e
a
Pass 3:  seek 0/0 ok, data (332) =3D   3c  68  74  6d  6c  3e  3c  68
65  61  64  3e  3c  6d  65  74  61  20  68  74  74  70  2d  65  71
75  69  76  3d  22  43  6f  6e  74  65  6e  74  2d  54  79  70  65
22  20  63  6f  6e  74  65  6e  74  3d  22  74  65  78  74  2f  68
74  6d  6c  3b  20  63  68  61  72  73  65  74  3d  55  54  46  2d
38  22  20  2f  3e  3c  74  69  74  6c  65  3e  67  20  2d  20  5b
33  34  6d  7e  41  5b  33  34  6d  7e  42  5b  33  34  6d  7e  40
d0  b0  d0  bd  d0  b8  5b  33  34  6d  7e  46  d0  b0  20  30  3c
2f  74  69  74  6c  65  3e  3c  2f  68  65  61  64  3e  3c  62  6f
64  79  3e  3c  61  20  68  72  65  65  78  2e  68  74  6d  6c  22
20  73  74  79  6c  65  3d  22  63  6f  6c  6f  72  3a  23  30  30
30  30  30  30  22  3e  d0  b2  d0  b2  d0  b5  5b  33  34  6d  7e
40  5b  33  34  6d  7e  45  3c  2f  61  3e  3c  62  72  3e  3c  62
72  3e  3c  62  3e  d0  a1  5b  33  34  6d  7e  42  5b  33  34  6d
7e  40  d0  b0  d0  bd  d0  b8  5b  33  34  6d  7e  46  d0  b0  20
30  3c  2f  62  3e  3c  74  61  62  6c  65  3e  3c  74  62  6f  64
79  3e  3c  74  72  20  62  67  63  6f  6c  6f  72  3d  22  23  30
30  30  30  30  30  22  20  73  74  79  6c  65  3d  22  63  6f  6c
6f  72  3a  23  66  66  66  66  66  66  22  3e  3c  74  64  20  77
69  64  3e  3c  62  3e  49  44  3c  2f  62  3e  3c  2f  74  64  3e
a








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

Date: Thu, 7 Jan 2010 00:56:37 -0800 (PST)
From: "alexxx.magni@gmail.com" <alexxx.magni@gmail.com>
Subject: Re: unicode newbie, can you help?
Message-Id: <985df547-a617-4993-b6a0-b02940a4f9e3@e37g2000yqn.googlegroups.com>

On 7 Gen, 09:51, "alexxx.ma...@gmail.com" <alexxx.ma...@gmail.com>
wrote:
> On 5 Gen, 19:45, s...@netherlands.com wrote:
>
>
>
> > On Tue, 5 Jan 2010 06:40:24 -0800 (PST), "alexxx.ma...@gmail.com" <alexxx.ma...@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?
>
> > >thanks for any help...
>
> > >alessandro
>

thanks everybody for your help,
the following did the trick - ok it was written in the html header in
clear letters that it was utf-8 - but until yesterday I never even
knew what encoding could mean...

alessandro

 perl -MEncode -wne '$_ = decode_utf8($_); foreach($_){if (/(\p
{InCyrillic})/){print"record $_ matches ===>>>$1<<<===\n\n\n"}else
{print"ok\n"}}' test.htm





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

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


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