[30575] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1818 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 25 11:09:45 2008

Date: Mon, 25 Aug 2008 08:09:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 25 Aug 2008     Volume: 11 Number: 1818

Today's topics:
    Re: better way to fetch and install packages than just  <whynot@pozharski.name>
        Converting the text output to excel via perl. <scriptsana@gmail.com>
    Re: Converting the text output to excel via perl. <g_r_a_n_t_@dodo.com.au>
    Re: Converting the text output to excel via perl. <gogala.mladen@gmail.com>
    Re: Converting the text output to excel via perl. <spamtrap@dot-app.org>
        Debugging "exit" <ignoramus9283@NOSPAM.9283.invalid>
    Re: Debugging "exit" <spamtrap@dot-app.org>
    Re: Is Perl breaking convention because it has no chara sln@netherlands.com
    Re: Is Perl breaking convention because it has no chara sln@netherlands.com
    Re: Is Perl breaking convention because it has no chara sln@netherlands.com
    Re: Is Perl breaking convention because it has no chara xhoster@gmail.com
    Re: Is Perl breaking convention because it has no chara <jurgenex@hotmail.com>
    Re: Is Perl breaking convention because it has no chara <mjcarman@mchsi.com>
        new CPAN modules on Mon Aug 25 2008 (Randal Schwartz)
    Re: printing two consecutive lines <joe@inwap.com>
        Regular express for <p>, <ul> and <ol> tags <mirzashahidmahmood@gmail.com>
    Re: Regular express for <p>, <ul> and <ol> tags <peter@makholm.net>
    Re: Regular express for <p>, <ul> and <ol> tags <spamtrap@dot-app.org>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 24 Aug 2008 22:13:28 +0300
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: better way to fetch and install packages than just a bunch of ?system ?calls?
Message-Id: <ofo8o5xuja.ln2@carpet.zombinet>

Ed <edwardjameshartnett@gmail.com> wrote:
> On Aug 22, 1:53 pm, Eric Pozharski <why...@pozharski.name> wrote:
>> Ed <edwardjameshartn...@gmail.com> wrote:
>> >            copy("/upc/share/ed/downloads/zlib-$
>> > {zlib_version}.tar.gz", $hdf5dir) || die;
>> In my experience B<File::Copy> has somewhat unintuitive notion of
>> what is error.  You've better don't rely on that.
> Hmmmm? How do you mean unintuitive?

Some time ago I've used B<File::Copy> for caching (to and fro).  I admit
that I've put it in circumstances it wasn't ready for (maybe).
L<File::Copy> says

	All functions return 1 on success, 0 on failure.  $! will be set
	if an error was encountered.

A problem here is "What is failure?" (in B<File::Copy> sense).  Right
now I've gave up on that.  I promise, some time later I'm going to
figure out all the cases that B<File::Copy> considers to be a failure
and file bugreport (L<perlstyle> violation).

*SKIP*
>> Don't write shell in Perl.
> What the heck does this mean?

That means exactly that.

That's shell:

	cp ../x.tgz y.tar.gz
	gunzip y.tar.gz
	tar -x y.tar

That's shell written in Perl:

	copy('../x.tgz', 'y.tar.gz');
	system('gunzip y.tar.gz');
	system('tar -x y.tar);

Tomorrow I'd write Perl in Perl section too.  But right now I'm not
ready yet (if I'd dare, I'd be beaten hardly).  So it's left as an
exercise for courious reader.

-- 
Torvalds' goal for Linux is very simple: World Domination


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

Date: Mon, 25 Aug 2008 00:10:41 -0700 (PDT)
From: Sana <scriptsana@gmail.com>
Subject: Converting the text output to excel via perl.
Message-Id: <9d2f3fe5-c804-480e-9feb-e5a6b93e362a@z11g2000prl.googlegroups.com>

I have the following output  which I want to convert into excel...Any
pointers how to achieve it via Spreadsheet::WriteExcel;

I am a beginer so pardon my lack of knowledge in perl.

lpar_name       minmem  desmem  maxmem  minpr   despr   maxpr
commuq21        2048    8192    12288   0.1     1.0     2.0
commuq20        2048    8192    12288   0.1     1.0     2.0
commuq23        2048    16384   40960   0.1     2.0     4.0
commud18        3072    40960   61440   0.2     2.0     5.0
commup03        2048    24576   30720   0.1     3.0     4.0
commup02        10240   32768   32768   1.0     4.0     8.0
commup01        10240   32768   32768   1.0     4.0     8.0

Regards
Sana


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

Date: Mon, 25 Aug 2008 18:51:50 +1000
From: Grant <g_r_a_n_t_@dodo.com.au>
Subject: Re: Converting the text output to excel via perl.
Message-Id: <ajs4b4hgl40v39r0cio2scggciri7lje98@4ax.com>

On Mon, 25 Aug 2008 00:10:41 -0700 (PDT), Sana <scriptsana@gmail.com> wrote:

>I have the following output  which I want to convert into excel...Any
>pointers how to achieve it via Spreadsheet::WriteExcel;
>
>I am a beginer so pardon my lack of knowledge in perl.
>
>lpar_name       minmem  desmem  maxmem  minpr   despr   maxpr
>commuq21        2048    8192    12288   0.1     1.0     2.0
>commuq20        2048    8192    12288   0.1     1.0     2.0
>commuq23        2048    16384   40960   0.1     2.0     4.0
>commud18        3072    40960   61440   0.2     2.0     5.0
>commup03        2048    24576   30720   0.1     3.0     4.0
>commup02        10240   32768   32768   1.0     4.0     8.0
>commup01        10240   32768   32768   1.0     4.0     8.0

Crikey mate, I used to just export to a <tab> delimited file and excel 
knows how to read them direct :)

Grant.
-- 
http://bugsplatter.id.au/


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

Date: Mon, 25 Aug 2008 12:03:34 +0200
From: Mladen Gogala <gogala.mladen@gmail.com>
Subject: Re: Converting the text output to excel via perl.
Message-Id: <g8u01n$2pj$1@registered.motzarella.org>

Grant wrote:

> Crikey mate, 

Obviously, that darned stingray hasn't done its job....

> I used to just export to a <tab> delimited file and excel 
> knows how to read them direct :)
> 

There is, of course, Text::CSV module on CPAN...
http://search.cpan.org/~makamaka/Text-CSV-1.08/lib/Text/CSV.pm

-- 
http://mgogala.freehostia.com


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

Date: Mon, 25 Aug 2008 10:20:30 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Converting the text output to excel via perl.
Message-Id: <m1iqtp18i9.fsf@dot-app.org>

Sana <scriptsana@gmail.com> writes:

> I have the following output  which I want to convert into excel...Any
> pointers how to achieve it via Spreadsheet::WriteExcel;
>
> I am a beginer so pardon my lack of knowledge in perl.
>
> lpar_name       minmem  desmem  maxmem  minpr   despr   maxpr
> commuq21        2048    8192    12288   0.1     1.0     2.0
> commuq20        2048    8192    12288   0.1     1.0     2.0
> commuq23        2048    16384   40960   0.1     2.0     4.0
> commud18        3072    40960   61440   0.2     2.0     5.0
> commup03        2048    24576   30720   0.1     3.0     4.0
> commup02        10240   32768   32768   1.0     4.0     8.0
> commup01        10240   32768   32768   1.0     4.0     8.0

It looks like you're already more than 99% of the way there - just put
tabs between the columns instead of padding them with spaces, and
you're all set. Excel can import tab-delimited data with no sweat, so
why leave yourself with the responsibility of keeping up with whatever
changes MS makes to the .xls format?

sherm--

-- 
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Mon, 25 Aug 2008 08:29:11 -0500
From: Ignoramus9283 <ignoramus9283@NOSPAM.9283.invalid>
Subject: Debugging "exit"
Message-Id: <UpOdnfD5hoo6Li_VnZ2dnUVZ_hmdnZ2d@giganews.com>

We have a script that is supposed to run continuously and never to
die or exit. And it generally does that, except that sometimes it does
not and exits mysteriously. 

We capture its stdout and stderr and there is "nothing abnormal". 

We do use strict and use warnings. 

So, I think that possibly some library routine, or some such thing,
calls "exit". I would like to trap exit globally, and still exit, but
at least print stack trace or some such, before exiting, is that
possible?

Is so, how?

thanks

-- 
   Due to extreme spam originating from Google Groups, and their inattention 
      to spammers, I and many others block all articles originating 
       from Google Groups. If you want your postings to be seen by 
         more readers you will need to find a different means of 
                       posting on Usenet.
                   http://improve-usenet.org/


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

Date: Mon, 25 Aug 2008 10:35:25 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Debugging "exit"
Message-Id: <m1abf117te.fsf@dot-app.org>

Ignoramus9283 <ignoramus9283@NOSPAM.9283.invalid> writes:

> We have a script that is supposed to run continuously and never to
> die or exit. And it generally does that, except that sometimes it does
> not and exits mysteriously. 
>
> We capture its stdout and stderr and there is "nothing abnormal". 
>
> We do use strict and use warnings. 
>
> So, I think that possibly some library routine, or some such thing,
> calls "exit". I would like to trap exit globally, and still exit

Sounds to me like you want an END block:

    END {
        print "Goodbye, world!\n";
    }

In a nutshell, END blocks are "... executed as late as possible, that
is, after perl has finished running the program and just before the
interpreter is being exited, even if it is exiting as a result of a
die() function." (from perlmod)

Note that there are some situations in which END blocks are not
called. Have a look at "perldoc perlmod" for details, in the section
"BEGIN, CHECK, INIT, and END".

> at least print stack trace or some such, before exiting, is that
> possible?

The caller() function will print a stack trace, at whatever depth you
want it. See "perldoc -f caller" for details.

sherm--

-- 
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Mon, 25 Aug 2008 01:10:19 GMT
From: sln@netherlands.com
Subject: Re: Is Perl breaking convention because it has no character arrays, just strings?
Message-Id: <sc14b45uaceatpra66jjn2hgollssit3nh@4ax.com>

On 25 Aug 2008 00:17:03 GMT, xhoster@gmail.com wrote:

>sln@netherlands.com wrote:
>> I'm a stronger C++ programmer than Perl.
>>
>> On another thread posted recently, someone was having a
>> problem with "sysread", passing in the correct buffer
>> variable. He assigned an intermediate variable to hold the
>> correct variable to pass in to sysread.
>>
>> I was a little taken aback, not by this confusion, but by
>> the fact that Perl's "sysread" (and all the reads) take a
>> parameter that is a pure scalar variable.
>>
>> This seemed kind of weird to me since to populate an external
>> buffer from within a user subroutine, a reference has to be passed in.
>>
>> Apparently, this doesen't apply to Perl's builtin functions.
>
>Nor does it apply to user-defined functions.
>
>my $x="foo";
>foo($x);
>print $x;
>sub foo{ $_[0]="bar"};
>__END__
>bar
>
>Xho

Oh, ok, $_[0] is an alias for $x.
When is it a reference?
Does the alias turn into a value after it is asigned?
Kindof spooky isn't it?

sln



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

Date: Mon, 25 Aug 2008 01:21:18 GMT
From: sln@netherlands.com
Subject: Re: Is Perl breaking convention because it has no character arrays, just strings?
Message-Id: <nu14b45flsu6tva51l8c0gov42g7ocgob1@4ax.com>

On Mon, 25 Aug 2008 02:28:58 +0200, Joost Diepenmaat <joost@zeekat.nl> wrote:

>sln@netherlands.com writes:
>
>> I'm a stronger C++ programmer than Perl.
>>
>> On another thread posted recently, someone was having a
>> problem with "sysread", passing in the correct buffer
>> variable. He assigned an intermediate variable to hold the
>> correct variable to pass in to sysread.
>>
>> I was a little taken aback, not by this confusion, but by
>> the fact that Perl's "sysread" (and all the reads) take a
>> parameter that is a pure scalar variable.
>
>That's just syntactic sugar.
>
>> This seemed kind of weird to me since to populate an external
>> buffer from within a user subroutine, a reference has to be passed in.
>
>Yeah. really, don't go down that road - just look at this as one of
>the particularities that perl *just* *has*. If you don't believe me:
>
>http://www.perl.com/pub/a/language/misc/fmproto.html
>
>> Apparently, this doesen't apply to Perl's builtin functions.
>
>sysread *is* is builtin function. if you really want to: read up on
>prototypes in perl.
>
>> I started thinking about C conventions.
>
>Please don't go there.
>
>> In C, there is a concept of "char a[10];", a character array, which
>> isin't present in Perl, the language, constuct's.
>> Conceptually, in C, the core language, it has always been pass by value
>> or pass by reference (or pointer).
>> In C, this applies to language core lib calls AND user defined function
>> calls (I say 'C' but "C++" is no different).
>>
>> I understand that the smallest data unit is SCALAR, however what I can't
>> understand this distinction:
>>
>> In C, you can't pass the address of a character to a function (system or user)
>> that isn't in a character array. char a[10]; function(a,,,) is really
>> function(&a[0],,,), the "address of a" is passed. Where char a; function(a,,,,),
>> the "value in a" is passed.
>> On the other hand, passing a reference of "a" to a function is assignable
>> within the function.
>>
>> So what I find dificult to concieve of is why, or how, Perl can take a seeming
>> "pass by value" in any other function call, and turn it into an assignable
>> address (or reference) in a Perl function call without having to actually
>> pass in a reference to the buffer.
>>
>> My only guess is that Perl parses and interprets its own call's different
>> than subroutine calls.
>
>Basically forget about C style prototypes when dealing with
>perl. Perl's prototype deal with coercion, C's prototypes do not.
>
>http://www.perlmonks.org/?node_id=447298

Well, Sherm Pedly has enlightened me on prototypes, so I guess the
paradox stands in neutral for now. But for the life of me, I can't find
any Perl prototypes for built-ins. Didn't see clear documentation that
indeed sysread is prototyped to take a reference.

The funny part is there was no mention of a prototype that will take a
reference.

Thanks!

sln



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

Date: Mon, 25 Aug 2008 01:23:05 GMT
From: sln@netherlands.com
Subject: Re: Is Perl breaking convention because it has no character arrays, just strings?
Message-Id: <ma24b45vtl3djhjgpo0u1ob8jmrblhepal@4ax.com>

On Mon, 25 Aug 2008 01:21:18 GMT, sln@netherlands.com wrote:

>On Mon, 25 Aug 2008 02:28:58 +0200, Joost Diepenmaat <joost@zeekat.nl> wrote:
>
>>sln@netherlands.com writes:
>>
>>> I'm a stronger C++ programmer than Perl.
>>>
>>> On another thread posted recently, someone was having a
>>> problem with "sysread", passing in the correct buffer
>>> variable. He assigned an intermediate variable to hold the
>>> correct variable to pass in to sysread.
>>>
>>> I was a little taken aback, not by this confusion, but by
>>> the fact that Perl's "sysread" (and all the reads) take a
>>> parameter that is a pure scalar variable.
>>
>>That's just syntactic sugar.
>>
>>> This seemed kind of weird to me since to populate an external
>>> buffer from within a user subroutine, a reference has to be passed in.
>>
>>Yeah. really, don't go down that road - just look at this as one of
>>the particularities that perl *just* *has*. If you don't believe me:
>>
>>http://www.perl.com/pub/a/language/misc/fmproto.html
>>
>>> Apparently, this doesen't apply to Perl's builtin functions.
>>
>>sysread *is* is builtin function. if you really want to: read up on
>>prototypes in perl.
>>
>>> I started thinking about C conventions.
>>
>>Please don't go there.
>>
>>> In C, there is a concept of "char a[10];", a character array, which
>>> isin't present in Perl, the language, constuct's.
>>> Conceptually, in C, the core language, it has always been pass by value
>>> or pass by reference (or pointer).
>>> In C, this applies to language core lib calls AND user defined function
>>> calls (I say 'C' but "C++" is no different).
>>>
>>> I understand that the smallest data unit is SCALAR, however what I can't
>>> understand this distinction:
>>>
>>> In C, you can't pass the address of a character to a function (system or user)
>>> that isn't in a character array. char a[10]; function(a,,,) is really
>>> function(&a[0],,,), the "address of a" is passed. Where char a; function(a,,,,),
>>> the "value in a" is passed.
>>> On the other hand, passing a reference of "a" to a function is assignable
>>> within the function.
>>>
>>> So what I find dificult to concieve of is why, or how, Perl can take a seeming
>>> "pass by value" in any other function call, and turn it into an assignable
>>> address (or reference) in a Perl function call without having to actually
>>> pass in a reference to the buffer.
>>>
>>> My only guess is that Perl parses and interprets its own call's different
>>> than subroutine calls.
>>
>>Basically forget about C style prototypes when dealing with
>>perl. Perl's prototype deal with coercion, C's prototypes do not.
>>
>>http://www.perlmonks.org/?node_id=447298
>
>Well, Sherm Pedly has enlightened me on prototypes, so I guess the
>paradox stands in neutral for now. But for the life of me, I can't find
>any Perl prototypes for built-ins. Didn't see clear documentation that
>indeed sysread is prototyped to take a reference.
>
>The funny part is there was no mention of a prototype that will take a
>reference.
  I mean to coerce a reference........
>
>Thanks!
>
>sln

sln


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

Date: 25 Aug 2008 01:35:12 GMT
From: xhoster@gmail.com
Subject: Re: Is Perl breaking convention because it has no character arrays, just strings?
Message-Id: <20080824213515.585$ZV@newsreader.com>

sln@netherlands.com wrote:
> On 25 Aug 2008 00:17:03 GMT, xhoster@gmail.com wrote:
> >sln@netherlands.com wrote:
> >>
> >> This seemed kind of weird to me since to populate an external
> >> buffer from within a user subroutine, a reference has to be passed in.
> >>
> >> Apparently, this doesen't apply to Perl's builtin functions.
> >
> >Nor does it apply to user-defined functions.
> >
> >my $x="foo";
> >foo($x);
> >print $x;
> >sub foo{ $_[0]="bar"};
> >__END__
> >bar
> >
> >Xho
>
> Oh, ok, $_[0] is an alias for $x.
> When is it a reference?

If $x contains a reference, then $_[0] contains a reference.

If you take a reference to $_[0], then you get a reference
to $x.

> Does the alias turn into a value after it is asigned?

That doesn't make much sense to me.  If you do
my $foo=$_[0];

Then $foo holds a value, just as it would if $x were in scope and you did
my $foo=$x;

$_[0] remains an alias for $x.  Assigning *from* it hasn't changed what it
is.

> Kindof spooky isn't it?

Not to me.  Not anymore, anyway.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.


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

Date: Mon, 25 Aug 2008 05:54:30 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Is Perl breaking convention because it has no character arrays, just strings?
Message-Id: <coh4b41gfi09218rmlcp07db3v29j80jg9@4ax.com>

sln@netherlands.com wrote:
>I started thinking about C conventions.
>In C, there is a concept of "char a[10];", a character array, which

More precisely it's nothing but a chunk of memory with all the
associated shortcomings and problems.

>I understand that the smallest data unit is SCALAR, however what I can't
>understand this distinction:
>
>In C, you can't pass the address of a character to a function (system or user)
>that isn't in a character array. char a[10]; function(a,,,) is really
>function(&a[0],,,), the "address of a" is passed. Where char a; function(a,,,,),
>the "value in a" is passed.
>On the other hand, passing a reference of "a" to a function is assignable
>within the function.

Well, C is a pretty low-level programming language with _A_LOT_ of
quirks and issues, many of them caused by being too close to assembler
or the attempt to give the programmer too detailed control.

>So what I find dificult to concieve of is why, or how, Perl can take a seeming
>"pass by value" in any other function call, and turn it into an assignable
>address (or reference) in a Perl function call without having to actually
>pass in a reference to the buffer.
>
>My only guess is that Perl parses and interprets its own call's different
>than subroutine calls.

Are you talking about C subroutine calls? Or course they are different!
Perl has and maintains its own data structures. 
I suggest you take some classes in compiler design. Many high-level
compilers use C as the target language and typically it is quite some
effort to map logical data structures into C's primitive concept of
memory chunks.

jue


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

Date: Mon, 25 Aug 2008 01:48:17 GMT
From: Michael Carman <mjcarman@mchsi.com>
Subject: Re: Is Perl breaking convention because it has no character arrays, just strings?
Message-Id: <Bbosk.312744$yE1.304054@attbi_s21>

sln@netherlands.com wrote:
> On 25 Aug 2008 00:17:03 GMT, xhoster@gmail.com wrote:
>> my $x="foo";
>> foo($x);
>> print $x;
>> sub foo{ $_[0]="bar"};
>> __END__
>> bar
> 
> Oh, ok, $_[0] is an alias for $x.

Correct.

> When is it a reference?

In this example, never. As others have shown, you can use prototypes to
get implicit pass-by-reference behavior.

> Does the alias turn into a value after it is asigned?

To get pass-by-value semantics you need make a copy of the data in @_

  my $x = shift;
  my ($y, @z) = @_;

This is the standard idiom in Perl, so in practice most programmers get
pass-by-value behavior even if they don't understand why. The aliasing
is awkward enough to use that you're unlikely to do so accidentally.

> Kindof spooky isn't it?

It's a little odd at first but it's consistent with Perl's behavior in
other contexts (like iterating over an array).

-mjc




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

Date: Mon, 25 Aug 2008 04:42:21 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Mon Aug 25 2008
Message-Id: <K653qL.pM2@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.

Alien-wxWidgets-0.38
http://search.cpan.org/~mbarbon/Alien-wxWidgets-0.38/
building, finding and using wxWidgets binaries 
----
App-ZofCMS-Plugin-NavMaker-0.0101
http://search.cpan.org/~zoffix/App-ZofCMS-Plugin-NavMaker-0.0101/
ZofCMS plugin for making navigation bars 
----
CGI-Lazy-0.08
http://search.cpan.org/~vayde/CGI-Lazy-0.08/
----
CatalystX-CRUD-0.29
http://search.cpan.org/~karman/CatalystX-CRUD-0.29/
CRUD framework for Catalyst applications 
----
CatalystX-CRUD-Model-RDBO-0.13
http://search.cpan.org/~karman/CatalystX-CRUD-Model-RDBO-0.13/
Rose::DB::Object CRUD 
----
CatalystX-CRUD-ModelAdapter-DBIC-0.03
http://search.cpan.org/~karman/CatalystX-CRUD-ModelAdapter-DBIC-0.03/
CRUD for Catalyst::Model::DBIC::Schema 
----
CatalystX-CRUD-ModelAdapter-DBIC-0.04
http://search.cpan.org/~karman/CatalystX-CRUD-ModelAdapter-DBIC-0.04/
CRUD for Catalyst::Model::DBIC::Schema 
----
DBIx-Class-RDBOHelpers-0.03
http://search.cpan.org/~karman/DBIx-Class-RDBOHelpers-0.03/
DBIC compat with Rose::DBx::Object::MoreHelpers 
----
Data-Transform-0.04_01
http://search.cpan.org/~martijn/Data-Transform-0.04_01/
base class for protocol abstractions 
----
DateTime-Calendar-Japanese-Era-0.08001
http://search.cpan.org/~dmaki/DateTime-Calendar-Japanese-Era-0.08001/
DateTime Extension for Japanese Eras 
----
DateTime-Format-Japanese-0.04000
http://search.cpan.org/~dmaki/DateTime-Format-Japanese-0.04000/
A Japanese DateTime Formatter 
----
Devel-Size-0.71
http://search.cpan.org/~tels/Devel-Size-0.71/
Perl extension for finding the memory usage of Perl variables 
----
EekBoek-1.03.93
http://search.cpan.org/~jv/EekBoek-1.03.93/
Bookkeeping software for small and medium-size businesses 
----
HTML-WebDAO-0.90
http://search.cpan.org/~zag/HTML-WebDAO-0.90/
Perl extension for create complex web application 
----
HTTP-DAV-0.32
http://search.cpan.org/~opera/HTTP-DAV-0.32/
A WebDAV client library for Perl5 
----
HTTP-DAV-0.33
http://search.cpan.org/~opera/HTTP-DAV-0.33/
A WebDAV client library for Perl5 
----
IO-Interactive-0.0.3_01
http://search.cpan.org/~bdfoy/IO-Interactive-0.0.3_01/
Utilities for interactive I/O 
----
Image-Pngslimmer-0.27
http://search.cpan.org/~acmcmen/Image-Pngslimmer-0.27/
slims (dynamically created) PNGs 
----
Image-Pngslimmer-0.28
http://search.cpan.org/~acmcmen/Image-Pngslimmer-0.28/
slims (dynamically created) PNGs 
----
Log-Facile-0.02
http://search.cpan.org/~sera/Log-Facile-0.02/
Perl extension for facile logging 
----
Mail-IMAPClient-3.10
http://search.cpan.org/~markov/Mail-IMAPClient-3.10/
An IMAP Client API 
----
Net-Identica-0.01
http://search.cpan.org/~haggai/Net-Identica-0.01/
Perl extension for fetching from, and posting notices/messages to Identi.ca 
----
Net-SSH-AuthorizedKeysFile-0.03
http://search.cpan.org/~mschilli/Net-SSH-AuthorizedKeysFile-0.03/
Read and modify ssh's authorized_keys files 
----
Parse-QTEDI-0.14
http://search.cpan.org/~dongxu/Parse-QTEDI-0.14/
Parse QT/KDE preprocessed headers 
----
Rose-HTMLx-Form-Related-0.03
http://search.cpan.org/~karman/Rose-HTMLx-Form-Related-0.03/
RHTMLO forms, living together 
----
Statistics-Contingency-0.08
http://search.cpan.org/~kwilliams/Statistics-Contingency-0.08/
Calculate precision, recall, F1, accuracy, etc. 
----
Term-Size-Win32-0.209
http://search.cpan.org/~ferreira/Term-Size-Win32-0.209/
Retrieve terminal size (on Windows) 
----
Text-Editor-Easy-0.40
http://search.cpan.org/~grommier/Text-Editor-Easy-0.40/
A perl module to edit perl code with syntax highlighting and more. 
----
WWW-NioTV-v0.02
http://search.cpan.org/~alec/WWW-NioTV-v0.02/
retrieve TV information from http://www.niotv.com/ 
----
WebService-Validator-HTML-W3C-0.23
http://search.cpan.org/~struan/WebService-Validator-HTML-W3C-0.23/
Access the W3Cs online HTML validator 
----
Wx-0.85
http://search.cpan.org/~mbarbon/Wx-0.85/
interface to the wxWidgets cross-platform GUI toolkit 
----
Zucchini-0.0.10
http://search.cpan.org/~chisel/Zucchini-0.0.10/
turn templates into static websites 


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: Mon, 25 Aug 2008 00:23:04 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: printing two consecutive lines
Message-Id: <mKCdnaNUIZx8wC_VnZ2dnUVZ_trinZ2d@comcast.com>

Sherm Pendley wrote:

> Is the "Endpoint" *always* two lines - never more nor less? If so, you
> could simply read the second line separately:
> 
>     if ($line =~ /Endpoint:/) {
>         my $line2 = <$fh>;
>         print $line, $line2;
>     }

To make it come out all on one line, add
    chomp $line;
just before the print.

	-Joe


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

Date: Mon, 25 Aug 2008 06:12:06 -0700 (PDT)
From: Shahid <mirzashahidmahmood@gmail.com>
Subject: Regular express for <p>, <ul> and <ol> tags
Message-Id: <1a0525b2-90ab-4d0d-a2a5-cae301e4b77f@r66g2000hsg.googlegroups.com>

Hi,
I am parsing an .HTML file that contains following example code:
 <div>
   <p class="html_preformatted" awml:style="HTML Preformatted"
dir="ltr" style="text-align:left"><span style="font-size:12pt;font-
family:'Arial'" xml:lang="en-US" lang="en-US">Normal Text Arial 12
Black before bullets.</span></p>
   <ul>
    <li class="html_preformatted" dir="ltr" style="text-
align:left">&nbsp;<span style="font-size:12pt;font-family:'Arial'"
xml:lang="en-US" lang="en-US">Bullet1: If you want to convert bitmap
images Single Line.</span></li>

    <li class="html_preformatted" dir="ltr" style="text-
align:left">&nbsp;<span style="font-size:12pt;font-family:'Arial'"
xml:lang="en-US" lang="en-US">Bullet2: D you want to convert </
span><span style="font-weight:bold;font-size:13pt;font-family:'Times
New Roman';color:#ff0000" xml:lang="en-US" lang="en-US">Times New
Roman Bold Red 13</span><span style="font-size:12pt;font-
family:'Arial'" xml:lang="en-US" lang="en-US"> like BMP, JPG?</span></
li>
    <li class="html_preformatted" dir="ltr" style="text-
align:left">&nbsp;<span style="font-weight:bold;font-size:12pt;font-
family:'Arial'" xml:lang="en-US" lang="en-US">Bullet3 bold:</
span><span style="font-size:12pt;font-family:'Arial'" xml:lang="en-US"
lang="en-US"> If you want to convert bitmap images like BMP, JPG</
span></li>
    <li class="html_preformatted" dir="ltr" style="text-
align:left">&nbsp;<span style="font-weight:bold;font-size:14pt;font-
family:'Arial'" xml:lang="en-US" lang="en-US">Bullet4 bold 14: </
span><span style="font-size:14pt;font-family:'Arial'" xml:lang="en-US"
lang="en-US">If you want to convert bitmap images like BMP, JPG 2
lines.</span></li>
    <li class="html_preformatted" dir="ltr" style="text-
align:left">&nbsp;<span style="font-weight:bold;font-size:16pt;font-
family:'Arial';color:#ff0000" xml:lang="en-US" lang="en-US">Bullet4
bold 14 all Red: </span><span style="font-size:16pt;font-
family:'Arial';color:#ff0000" xml:lang="en-US" lang="en-US">If you
want to convert bitmap images like BMP, JPG.</span></li>

    <li class="html_preformatted" dir="ltr" style="text-
align:left">&nbsp;<span style="font-weight:bold;font-size:14pt;font-
family:'Arial'" xml:lang="en-US" lang="en-US">Bullet4 bold 14 Black: </
span><span style="font-size:14pt;font-family:'Arial';color:#0000ff"
xml:lang="en-US" lang="en-US">Blue If you want to convert bitmap. </
span><span style="font-size:16pt;font-family:'Arial';color:#008000"
xml:lang="en-US" lang="en-US">Green 16 images like BMP, JPG.</span>
</li>
   </ul>
   <p class="html_preformatted" awml:style="HTML Preformatted"
dir="ltr" style="text-align:left"><span style="font-size:14pt;font-
family:'Arial';color:#ff0000" xml:lang="en-US" lang="en-US">Normal
Text Red Arial 14 after bullets.</span></p>
   <p class="html_preformatted" awml:style="HTML Preformatted"
dir="ltr" style="text-align:left;margin-left:0.2500in"><span
style="font-weight:bold;font-size:14pt;font-family:'Arial'"
xml:lang="en-US" lang="en-US">&nbsp;</span></p>
   <p dir="ltr" style="text-align:left"></p>
   <p></p>
  </div>

I am trying to parse all the <p>, <ol> and <ul> tags but couldn't
succeed yet.
I am trying following Regular Expression(RE):
"(<[pP][^>]*>(.*)</[pP]>)|(<[oO][lL][^>]+>(.*)</[oO][lL]>)|(<[uU][lL]
[^>]+>(.*)</[uU][lL]>)"

I am using preg_match_all(). Remember I am working in PHP.
If any one can help me, I will be very grateful to him/her. I need its
solution urgent.


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

Date: Mon, 25 Aug 2008 15:45:42 +0200
From: Peter Makholm <peter@makholm.net>
Subject: Re: Regular express for <p>, <ul> and <ol> tags
Message-Id: <87prnxgqd5.fsf@hacking.dk>

Shahid <mirzashahidmahmood@gmail.com> writes:

> I am trying to parse all the <p>, <ol> and <ul> tags but couldn't
> succeed yet.
> I am trying following Regular Expression(RE):
> "(<[pP][^>]*>(.*)</[pP]>)|(<[oO][lL][^>]+>(.*)</[oO][lL]>)|(<[uU][lL]
> [^>]+>(.*)</[uU][lL]>)"

Regular expressions is in general not the right tool to hadle xml and
other xml-like data formats. You should us a module that parses the
HTML correctly instead. HTML::TreeBuilder is one possibility.

> I am using preg_match_all(). Remember I am working in PHP.

Then you shouldn't use an perl group for you question. but even PHP
should have better tools to parse HTML than regular
expressionsm. Asking in a PHP forum should tell you which tools this
is.

//Makholm





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

Date: Mon, 25 Aug 2008 10:22:02 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Regular express for <p>, <ul> and <ol> tags
Message-Id: <m1ej4d18fp.fsf@dot-app.org>

Shahid <mirzashahidmahmood@gmail.com> writes:

> I am using preg_match_all(). Remember I am working in PHP.

Try comp.lang.php - we speak Perl here.

sherm--

-- 
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

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


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