[30925] in Perl-Users-Digest
Perl-Users Digest, Issue: 2170 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 29 09:09:42 2009
Date: Thu, 29 Jan 2009 06: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, 29 Jan 2009 Volume: 11 Number: 2170
Today's topics:
Re: I need a job in C/C++/Perl immediately. Telecomute <tim@burlyhost.com>
Re: Is syswrite faster or print <uri@stemsystems.com>
Re: Is syswrite faster or print <saurabh.hirani@gmail.com>
Re: MIME:Lite email address issue <nospam@somewhere.com>
Re: MIME:Lite email address issue <edMbj@aes-intl.com>
new CPAN modules on Thu Jan 29 2009 (Randal Schwartz)
Re: Perl Peeves <whynot@pozharski.name>
Re: problem using memoize in folder where a module Conf <sergey.aleynikov@gmail.com>
Re: problem using memoize in folder where a module Conf <michaelgang@gmail.com>
Re: problem using memoize in folder where a module Conf <tadmc@seesig.invalid>
Re: Regex for <option> ... </option> <whynot@pozharski.name>
Re: syntax color lang source code in blogs or website <bettini@dsi.unifi.it>
Re: Want to extract the proxy list by using regexp. <tadmc@seesig.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 28 Jan 2009 21:58:34 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: I need a job in C/C++/Perl immediately. Telecomute only. Full-Time. Regex/XML/Database/Parsing(et all) Expert. Will work for 60k the first year guaranteed !!
Message-Id: <fAbgl.218698$2w3.36191@newsfe19.iad>
Keith Keller wrote:
> On 2009-01-29, Tim Greer <tim@burlyhost.com> wrote:
>>
>> As hard as you try, your problems are not my problems. Please,
>> invest in a mirror.
>
> He is trolling. You are falling for it. If you stop feeding him
> perhaps he'll go away (or at least post less frequently).
>
> --keith
>
I'm not falling for anything. People don't only respond because they
are "falling for" something. And no, he won't stop posting, which is
why it isn't going to help to ignore him. As unusual as it is, this
particular poster actually gives up after he's made a fool of himself.
Not that I believe it has much (or any) sense, but if he did, he'd
realize how counter productive he's being to his own job hunt.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
------------------------------
Date: Thu, 29 Jan 2009 00:20:17 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Is syswrite faster or print
Message-Id: <x7pri67koe.fsf@mail.sysarch.com>
>>>>> "JWK" == John W Krahn <someone@example.com> writes:
JWK> Uri Guttman wrote:
>>>>>>> "BaB" == Big and Blue <No_4@dsl.pipex.com> writes:
BaB> saurabh hirani wrote:
>> >> Why shouldn't I? The faster my log method is, the earlier I return and
>> >> get control back to my main programs.
BaB> fork() an let the child do the logging. If you have
>> multiple cores
BaB> this will speed things up.
>> logging is typically more i/o than cpu so forking is not a
>> solution. would you fork for each log entry to be written? would you
>> want the logger and main program to communicate? then you have another
>> bottleneck. if you want the logging to be synchronous and in order you
>> can't delegate it or fork it as you lose control then.
>> to the OP:
>> print vs syswrite is not a proper decision as they do different
>> things. if you turn off buffering with autoflush then you reduce print
>> to being syswrite but with more overhead.
JWK> You can't turn off buffering with autoflush.
JWK> man 3 setvbuf
JWK> man 3 fflush
i meant buffering many prints before flushing to the file. normal stdio
does that but that is also the reason why log entries can cross each
other when using print from different processes. (this doesn't matter if
you only log from a single process). syswrite is atomic and can't screw
up the log entries. it is slower since it does a full syscall each time
whereas print will usually be fully buffered. turning on autoflush will
make print act more like syswrite and flush its buffer with likely a
single call to write (c's write which is perl's syswrite).
the point is still that speed isn't the issue when you write logs,
atomicity it. print can't guarantee it and syswrite can. it is a case of
getting it to work correctly before worrying about speed.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Thu, 29 Jan 2009 02:53:59 -0800 (PST)
From: saurabh hirani <saurabh.hirani@gmail.com>
Subject: Re: Is syswrite faster or print
Message-Id: <4f1e03e9-962f-4eac-bbe0-e8514e998a09@w1g2000prm.googlegroups.com>
> print vs syswrite is not a proper decision as they do different
> things. if you turn off buffering with autoflush then you reduce print
> to being syswrite but with more overhead. as for worrying about logging
> speed, that is a case of premature optimization. use a log module if you
> really care. worry about the important stuff, not nits like log speed
>
Thanks a lot to all for replying. I appreciate your viewpoints.
I did find that turning on autoflush on my file handle helps to
prevent print buffering upto 4 K before writing to a log file. While
I was writing this query, I was thinking about whether I am doing
premature optimization by concentrating on these parts. But I am
creating a customized log module and hence I wanted to know. I have
ensured that even if 2 instances of the same program are running they
will be logging to different log files. Atomicity was taken care of.
After doing that I started thinking about the speed of logging. But
looking back it does seem like a case of concentrating on laying
bricks when I should be building a house. : ) Live and learn.
> uri
>
> --
> Uri Guttman =A0------ =A0u...@stemsystems.com =A0-------- =A0http://www.s=
ysarch.com--
> ----- =A0Perl Code Review , Architecture, Development, Training, Support =
------
> --------- Free Perl Training ---http://perlhunter.com/college.html-------=
--
> --------- =A0Gourmet Hot Cocoa Mix =A0---- =A0http://bestfriendscocoa.com=
---------
------------------------------
Date: Thu, 29 Jan 2009 01:26:21 -0500
From: "Thrill5" <nospam@somewhere.com>
Subject: Re: MIME:Lite email address issue
Message-Id: <glri6g$vb3$1@nntp.motzarella.org>
"Ed Jay" <edMbj@aes-intl.com> wrote in message
news:cfd2o4pklcupic5raq4ucm3ijpdruc928c@4ax.com...
> I'm using MIME::Lite to send an email with an attachment. It works fine,
> except for one detail. Unless I use a specific email address, the email
> and attachment are not delivered. To wit:
>
> I use From => $rpt_email,
>
> For $rpt_email = ed@example.com, the email is delivered. example.com is
> NOT the domain in which the script resides.
>
> For $rpt_email = something@example2.com, the email is not delivered.
> example2.com is the domain hosting the script.
>
I'm assuming you really mean that "example2.com" is the local domain of the
SMTP server that you are using. The issue lies with the SMTP server, not
MIME::Lite.
------------------------------
Date: Wed, 28 Jan 2009 22:46:13 -0800
From: Ed Jay <edMbj@aes-intl.com>
Subject: Re: MIME:Lite email address issue
Message-Id: <guj2o45tap5t453rllrau0c6k0j575kgnh@4ax.com>
Thrill5 wrote:
>
>"Ed Jay" <edMbj@aes-intl.com> wrote in message
>news:cfd2o4pklcupic5raq4ucm3ijpdruc928c@4ax.com...
>> I'm using MIME::Lite to send an email with an attachment. It works fine,
>> except for one detail. Unless I use a specific email address, the email
>> and attachment are not delivered. To wit:
>>
>> I use From => $rpt_email,
>>
>> For $rpt_email = ed@example.com, the email is delivered. example.com is
>> NOT the domain in which the script resides.
>>
>> For $rpt_email = something@example2.com, the email is not delivered.
>> example2.com is the domain hosting the script.
>>
>I'm assuming you really mean that "example2.com" is the local domain of the
>SMTP server that you are using.
Yes.
>The issue lies with the SMTP server, not MIME::Lite.
>
The same script sends emails w/o attachments using the example2
From-address using 'sendmail.' No problems ever noted.
--
Ed Jay (remove 'M' to reply by email)
Win the War Against Breast Cancer.
Knowing the facts could save your life.
http://www.breastthermography.info
------------------------------
Date: Thu, 29 Jan 2009 05:42:26 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Thu Jan 29 2009
Message-Id: <KE7x6q.12Gu@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
AnyEvent-XMPP-0.3
http://search.cpan.org/~elmex/AnyEvent-XMPP-0.3/
An implementation of the XMPP Protocol
----
Apache2-ASP-2.15
http://search.cpan.org/~johnd/Apache2-ASP-2.15/
ASP for Perl, reloaded.
----
App-Nopaste-0.09
http://search.cpan.org/~sartak/App-Nopaste-0.09/
easy access to any pastebin
----
App-Nopaste-0.10
http://search.cpan.org/~sartak/App-Nopaste-0.10/
easy access to any pastebin
----
App-Sequence-0.01_05
http://search.cpan.org/~kimoto/App-Sequence-0.01_05/
useful plaggable subroutine engine.
----
Audio-Ecasound-Multitrack-0.995
http://search.cpan.org/~ganglion/Audio-Ecasound-Multitrack-0.995/
Perl extensions for multitrack audio processing
----
Audio-Extract-PCM-0.04_57
http://search.cpan.org/~pepe/Audio-Extract-PCM-0.04_57/
Extract PCM data from audio files
----
Audio-Extract-PCM-0.04_58
http://search.cpan.org/~pepe/Audio-Extract-PCM-0.04_58/
Extract PCM data from audio files
----
BioPerl-db-1.5.9_1
http://search.cpan.org/~cjfields/BioPerl-db-1.5.9_1/
----
BioPerl-network-1.5.9_1
http://search.cpan.org/~cjfields/BioPerl-network-1.5.9_1/
----
BioPerl-run-1.5.9_1
http://search.cpan.org/~cjfields/BioPerl-run-1.5.9_1/
----
CGI-ContactForm-1.44
http://search.cpan.org/~gunnar/CGI-ContactForm-1.44/
Generate a web contact form
----
Catalyst-Authentication-Store-Tangram-0.006
http://search.cpan.org/~bobtfish/Catalyst-Authentication-Store-Tangram-0.006/
A storage class for Catalyst authentication from a class stored in Tangram
----
Catalyst-Plugin-Session-Store-FastMmap-0.06
http://search.cpan.org/~karman/Catalyst-Plugin-Session-Store-FastMmap-0.06/
FastMmap session storage backend.
----
Catalyst-View-TT-ForceUTF8-0.10
http://search.cpan.org/~lyokato/Catalyst-View-TT-ForceUTF8-0.10/
Template View Class with utf8 encoding
----
Class-Attribute-0.022
http://search.cpan.org/~deepfryed/Class-Attribute-0.022/
Another way to define class attributes!!!
----
Class-LazyFactory-0.02
http://search.cpan.org/~dtady/Class-LazyFactory-0.02/
Base class factory for lazy-loaded concrete classes
----
Config-Model-Backend-Augeas-0.105
http://search.cpan.org/~ddumont/Config-Model-Backend-Augeas-0.105/
Read and write config data through Augeas
----
Data-ObjectDriver-0.06
http://search.cpan.org/~btrott/Data-ObjectDriver-0.06/
Simple, transparent data interface, with caching
----
Data-Rx-Type-Perl-0.001
http://search.cpan.org/~rjbs/Data-Rx-Type-Perl-0.001/
experimental / perl types
----
Dist-Zilla-Plugin-PodPurler-0.001
http://search.cpan.org/~rjbs/Dist-Zilla-Plugin-PodPurler-0.001/
like PodWeaver, but more erratic and amateurish
----
Dotiac-0.7
http://search.cpan.org/~maluku/Dotiac-0.7/
----
Email-MIME-Kit-2.001
http://search.cpan.org/~rjbs/Email-MIME-Kit-2.001/
build messages from templates
----
Filesys-Virtual-Async-0.01
http://search.cpan.org/~xantus/Filesys-Virtual-Async-0.01/
Base class for non blocking virtual filesystems
----
Filesys-Virtual-Async-Dispatcher-0.01
http://search.cpan.org/~apocal/Filesys-Virtual-Async-Dispatcher-0.01/
Multiple filesystems mounted on a single filesystem
----
Filesys-Virtual-Async-inMemory-0.01
http://search.cpan.org/~apocal/Filesys-Virtual-Async-inMemory-0.01/
Mount filesystems that reside in memory ( sort of ramfs )
----
Geo-EOP-0.12
http://search.cpan.org/~markov/Geo-EOP-0.12/
Earth Observation Products EOP
----
Hessian-0.1.0
http://search.cpan.org/~heytrav/Hessian-0.1.0/
----
IPDevice-Allnet-ALL4000-0.11
http://search.cpan.org/~rcl/IPDevice-Allnet-ALL4000-0.11/
provides an interface to ALL4000 ethernet sensormeter
----
IPDevice-Allnet-ALL4000-0.12
http://search.cpan.org/~rcl/IPDevice-Allnet-ALL4000-0.12/
provides an interface to ALL4000 ethernet sensormeter
----
Linux-Input-Wiiuse-0.01
http://search.cpan.org/~wilsond/Linux-Input-Wiiuse-0.01/
Use Nintendo Wiimote as an input device via libwiiuse
----
MooseX-Attribute-Prototype-0.04
http://search.cpan.org/~ctbrown/MooseX-Attribute-Prototype-0.04/
Borrow and Extend Moose Attrtibutes
----
Net-LDAP-Class-0.18_03
http://search.cpan.org/~karman/Net-LDAP-Class-0.18_03/
object-relational mapper for Net::LDAP
----
Net-Twitter-Cabal-0.01
http://search.cpan.org/~pfig/Net-Twitter-Cabal-0.01/
Manage posters to a Twitter stream
----
OpenGL-Earth-0.02
http://search.cpan.org/~cosimo/OpenGL-Earth-0.02/
----
OpenGL-Earth-0.03
http://search.cpan.org/~cosimo/OpenGL-Earth-0.03/
----
PICA-Record-0.4
http://search.cpan.org/~voj/PICA-Record-0.4/
Perl extension for handling PICA+ records
----
POE-Component-Fuse-0.02
http://search.cpan.org/~apocal/POE-Component-Fuse-0.02/
Using FUSE in POE asynchronously
----
POE-Component-Fuse-0.03
http://search.cpan.org/~apocal/POE-Component-Fuse-0.03/
Using FUSE in POE asynchronously
----
POE-Component-IRC-5.96
http://search.cpan.org/~bingos/POE-Component-IRC-5.96/
A fully event-driven IRC client module
----
POE-Devel-ProcAlike-0.01
http://search.cpan.org/~apocal/POE-Devel-ProcAlike-0.01/
Exposing the guts of POE via FUSE
----
POE-Filter-Transparent-SMTP-0.2
http://search.cpan.org/~ultradm/POE-Filter-Transparent-SMTP-0.2/
Make SMTP transparency a breeze :)
----
Path-Dispatcher-0.07
http://search.cpan.org/~sartak/Path-Dispatcher-0.07/
flexible dispatch
----
PerlIO-via-escape_ansi-0.01
http://search.cpan.org/~saper/PerlIO-via-escape_ansi-0.01/
PerlIO layer to escape ANSI sequences
----
Sofu-0.3
http://search.cpan.org/~maluku/Sofu-0.3/
Perl extension for Sofu data
----
Storable-AMF-0.46
http://search.cpan.org/~grian/Storable-AMF-0.46/
Perl extension for serialize/deserialize AMF0/AMF3 data
----
Syntax-Highlight-Perl6-0.037
http://search.cpan.org/~azawawi/Syntax-Highlight-Perl6-0.037/
Perl 6 Syntax Highlighter
----
Syntax-Highlight-Perl6-0.038
http://search.cpan.org/~azawawi/Syntax-Highlight-Perl6-0.038/
Perl 6 Syntax Highlighter
----
Sys-Filesystem-MountPoint-1.02
http://search.cpan.org/~leocharre/Sys-Filesystem-MountPoint-1.02/
shortcuts to resolve paths and devices to mount points
----
Sys-Mmap-Simple-0.09
http://search.cpan.org/~leont/Sys-Mmap-Simple-0.09/
Memory mapping made simple and safe.
----
Sys-Sendfile-0.05
http://search.cpan.org/~leont/Sys-Sendfile-0.05/
Zero-copy data transfer
----
Task-Kensho-0.0.8
http://search.cpan.org/~perigrin/Task-Kensho-0.0.8/
A Glimpse at an Enlightened Perl
----
Verilog-Perl-3.110
http://search.cpan.org/~wsnyder/Verilog-Perl-3.110/
----
WWW-Gazetteer-HeavensAbove-0.17
http://search.cpan.org/~book/WWW-Gazetteer-HeavensAbove-0.17/
Find location of world towns and cities
----
WWW-PivotalTracker-0.16
http://search.cpan.org/~jhelwig/WWW-PivotalTracker-0.16/
Functional interface to Pivotal Tracker <http://www.pivotaltracker.com/>
----
XML-ExtOn-0.09
http://search.cpan.org/~zag/XML-ExtOn-0.09/
The handler for expansion of Perl SAX by objects.
----
Yahoo-Marketing-5.01
http://search.cpan.org/~shenj/Yahoo-Marketing-5.01/
an interface for Yahoo! Search Marketing's Web Services.
----
ZConf-BGSet-0.0.2
http://search.cpan.org/~vvelox/ZConf-BGSet-0.0.2/
A perl module for background management.
----
ex-lib-0.03
http://search.cpan.org/~mons/ex-lib-0.03/
The same as lib, but makes relative path absolute.
----
lvalue-0.01
http://search.cpan.org/~mons/lvalue-0.01/
use lvalue subroutines with ease
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: Thu, 29 Jan 2009 10:45:57 +0200
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: Perl Peeves
Message-Id: <slrngo2r66.6fu.whynot@orphan.zombinet>
On 2009-01-28, Peter J. Holzer <hjp-usenet2@hjp.at> wrote:
> On 2009-01-27 09:08, Eric Pozharski <whynot@pozharski.name> wrote:
>> On 2009-01-27, Tim McDaniel <tmcd@panix.com> wrote:
>>> (5) That "special false". I was going nuts trying to figure out what
>>> was different between
>
> [ '' in string context, 0 in numeric context ]
>
>> That special false is evaluated to blah-blah-blah *immediately* since
>> the context is known at compile time (am I right?).
>
> No. Consider:
>
> #!/usr/bin/perl
> use warnings;
> use strict;
>
> my $bool = (1 < 0);
>
> if (rand() < 0.5) {
> print "<$bool>\n";
> } else {
> print 0 + $bool, "\n";
> }
No, special false is sticky. That explains better though, I think.
perl -wle '
my($nil, $empty) = (0, q||);
print qq|<$nil> <$empty>|;
print 0 + $nil;
print 0 + $empty;
'
<0> <>
0
Argument "" isn't numeric in addition (+) at -e line 5.
0
p.s. IOW -- me wrongs.
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
------------------------------
Date: Thu, 29 Jan 2009 03:06:22 -0800 (PST)
From: "sergey.aleynikov@gmail.com" <sergey.aleynikov@gmail.com>
Subject: Re: problem using memoize in folder where a module Config.pm is
Message-Id: <1c8db072-5737-4257-9f95-500cc082024b@v5g2000prm.googlegroups.com>
>How can i solve the problem ?
try changing "use Memoize;" with following:
BEGIN{
local @INC = grep { $_ !~ /^\./ } @INC;
require Memoize;
Memoize->import('memoize');
}
This would prevent searching for modules (Config.pm) in current folder.
------------------------------
Date: Thu, 29 Jan 2009 03:37:16 -0800 (PST)
From: david <michaelgang@gmail.com>
Subject: Re: problem using memoize in folder where a module Config.pm is
Message-Id: <2fefb274-4738-4efb-9c1e-b2868704c0f1@r36g2000prf.googlegroups.com>
On Jan 29, 1:06=A0pm, "sergey.aleyni...@gmail.com"
<sergey.aleyni...@gmail.com> wrote:
> >How can i solve the problem ?
>
> try changing "use Memoize;" with following:
>
> BEGIN{
> =A0local @INC =3D grep { $_ !~ /^\./ } @INC;
> =A0require Memoize;
> =A0Memoize->import('memoize');
>
> }
>
> This would prevent searching for modules (Config.pm) in current folder.
cool idea.
This works
------------------------------
Date: Thu, 29 Jan 2009 06:55:01 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: problem using memoize in folder where a module Config.pm is
Message-Id: <slrngo39p5.1s3.tadmc@tadmc30.sbcglobal.net>
sergey.aleynikov@gmail.com <sergey.aleynikov@gmail.com> wrote:
>>How can i solve the problem ?
>
> try changing "use Memoize;" with following:
>
> BEGIN{
> local @INC = grep { $_ !~ /^\./ } @INC;
There may be babies in that bathwater.
If you want to elimnate only the current directory, then eliminate
only the current directory:
local @INC = grep { $_ ne '.' } @INC;
> require Memoize;
> Memoize->import('memoize');
> }
>
> This would prevent searching for modules (Config.pm) in current folder.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Thu, 29 Jan 2009 10:31:41 +0200
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: Regex for <option> ... </option>
Message-Id: <slrngo2qbe.6fu.whynot@orphan.zombinet>
On 2009-01-29, Tad J McClellan <tadmc@seesig.invalid> wrote:
> sln@netherlands.com <sln@netherlands.com> wrote:
>
>> XHTML/XML/SGML and HTML standards are now and have been for quite some time
>> defined with REGULAR ESPRESSIONS exclusively.
>
>
> No they haven't.
>
> They are defined with a context free grammar, not a regular grammar.
And they aren't standards anyway. Those are specifications.
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
------------------------------
Date: Thu, 29 Jan 2009 14:41:00 +0100
From: Lorenzo Bettini <bettini@dsi.unifi.it>
Subject: Re: syntax color lang source code in blogs or website
Message-Id: <4981b1ea$1@news.x-privat.org>
Xah Lee wrote:
> For those of you using emacs, here's the elisp code that allows you to
> syntax color computer language source code in your blog or website.
>
> http://xahlee.org/emacs/elisp_htmlize.html
>
may I suggest also this one: http://www.gnu.org/software/src-highlite/
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
------------------------------
Date: Thu, 29 Jan 2009 06:50:36 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Want to extract the proxy list by using regexp.
Message-Id: <slrngo39gs.1s3.tadmc@tadmc30.sbcglobal.net>
Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
> I want to extract the proxy list given in the following url:
>
> http://www.cybersyndrome.net/pla5.html
> Then I want to use some regular expressions to extract the proxy list,
> who can give me some hints?
Regular expressions are most often not the Right Tool for processing
HTML data.
A module that understands HTML is best for processing HTML data.
------------------------------
#!/usr/bin/perl
use warnings;
use strict;
use HTML::TreeBuilder;
use LWP::Simple;
my $html = get 'http://www.cybersyndrome.net/pla5.html';
my $tree = HTML::TreeBuilder->new_from_content($html);
foreach my $elem ( $tree->find_by_attribute('onmouseout', 'd()') ) {
print $elem->as_text, "\n";
}
------------------------------
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
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 2170
***************************************