[30554] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1797 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 16 09:09:56 2008

Date: Sat, 16 Aug 2008 06:09:19 -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           Sat, 16 Aug 2008     Volume: 11 Number: 1797

Today's topics:
        array comparision <mstep@podiuminternational.org>
    Re: array comparision <ben@morrow.me.uk>
    Re: array comparision <amphetamachine@gmail.com>
    Re: array comparision <amphetamachine@gmail.com>
    Re: array comparision <jurgenex@hotmail.com>
    Re: array comparision <jurgenex@hotmail.com>
        How to make PerlScript work in firefox3 on xpsp3 <vsrawat@gmail.com>
    Re: How to make PerlScript work in firefox3 on xpsp3 <ben@morrow.me.uk>
    Re: How to make PerlScript work in firefox3 on xpsp3 <vsrawat@gmail.com>
        List Context in a Boolean Expression <amphetamachine@gmail.com>
    Re: List Context in a Boolean Expression <jurgenex@hotmail.com>
        new CPAN modules on Sat Aug 16 2008 (Randal Schwartz)
    Re: perlish way for ( 0 .. $n) , but downcounting <whynot@pozharski.name>
    Re: perlish way for ( 0 .. $n) , but downcounting <ben@morrow.me.uk>
    Re: This is very OT, and its just a request. It has to  <jwkenne@attglobal.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 15 Aug 2008 22:22:26 -0700 (PDT)
From: Marek <mstep@podiuminternational.org>
Subject: array comparision
Message-Id: <c1c06238-4c87-40bd-a421-b5e4383ec67a@f63g2000hsf.googlegroups.com>



Hello all!


I have several lines where I need to know whether the numbers are the
same or not.

I made an example, and my questions are inserted as comments:

Thank you for your help


marek


#! /usr/local/bin/perl

use warnings;
use strict;

my $line1 = "Mon, 04.08.2008	61126.10	79071.30	3567	2648.00	2864.00";
my $line2 =
"Die, 05.08.2008 7:40-19:40	12:00	61198.70	79103.40	3574	2648.00
2950.70	Name1";

my @array1 = split( /\t\s*/, $line1 );
my @array2 = split( /\t\s*/, $line2 );

my @array3;
for (@array1) { push @array3, $_ if $_ =~ /^\d+(?:\.\d+)?$/ };
   # do I really need a different array, to "slice out" my numbers?
   # Is there not a more elegant (perlish) way to do this?
my @array4;
for (@array2) { push @array4, $_ if $_ =~ /^\d+(?:\.\d+)?$/ };

my $same = 1;
$same = $same && @array3 == @array4;
  # this compares only the number of elements of these arrays.
  # how to iterate over each element and compare them?

if ($same) {
    print "these numbers are the same!\n";
    print join( "\t", @array3 );
    print "\n";
    print join( "\t", @array4 );
    print "\n";
}
else {
    print "these numbers are not the same!\n\n";
    print join( "\t", @array3 );
    print "\n";
    print join( "\t", @array4 );
    print "\n";
}



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

Date: Sat, 16 Aug 2008 09:45:03 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: array comparision
Message-Id: <flgin5-4q1.ln1@osiris.mauzo.dyndns.org>


Quoth Marek <mstep@podiuminternational.org>:
> 
> Hello all!
> 
> 
> I have several lines where I need to know whether the numbers are the
> same or not.
> 
> I made an example, and my questions are inserted as comments:
> 
> Thank you for your help
> 
> 
> marek
> 
> 
> #! /usr/local/bin/perl
> 
> use warnings;
> use strict;
> 
> my $line1 = "Mon, 04.08.2008	61126.10	79071.30	3567	2648.00	2864.00";
> my $line2 =
> "Die, 05.08.2008 7:40-19:40	12:00	61198.70	79103.40	3574	2648.00
> 2950.70	Name1";
> 
> my @array1 = split( /\t\s*/, $line1 );
> my @array2 = split( /\t\s*/, $line2 );
> 
> my @array3;
> for (@array1) { push @array3, $_ if $_ =~ /^\d+(?:\.\d+)?$/ };
>    # do I really need a different array, to "slice out" my numbers?
>    # Is there not a more elegant (perlish) way to do this?

Yes, you can use 'map', like this:

    my @array3 =
        map { /^\d+(?:\.\d+)?$/ ? $_ : () }
        split /\t\s*/,
        $line1;

> my @array4;
> for (@array2) { push @array4, $_ if $_ =~ /^\d+(?:\.\d+)?$/ };
> 
> my $same = 1;
> $same = $same && @array3 == @array4;
>   # this compares only the number of elements of these arrays.
>   # how to iterate over each element and compare them?

Well, the obvious way is

    my $same = 
        @array3 == @array4 &&
        !grep { $array3[$_] == $array4[$_] } 0..$#array3;

but it would be better to use a module like Data::Compare

    use Data::Compare;

    my $same = Compare \@array3, \@array4;

Ben

-- 
Like all men in Babylon I have been a proconsul; like all, a slave ... During
one lunar year, I have been declared invisible; I shrieked and was not heard,
I stole my bread and was not decapitated.
~ ben@morrow.me.uk ~                   Jorge Luis Borges, 'The Babylon Lottery'


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

Date: Sat, 16 Aug 2008 01:54:00 -0700 (PDT)
From: h3xx <amphetamachine@gmail.com>
Subject: Re: array comparision
Message-Id: <0cece7fd-14a6-42f6-851f-c8bab09fb7ca@x41g2000hsb.googlegroups.com>

On Aug 16, 12:22=A0am, Marek <ms...@podiuminternational.org> wrote:
> Hello all!
>
> I have several lines where I need to know whether the numbers are the
> same or not.
>
> I made an example, and my questions are inserted as comments:
>
> Thank you for your help
>
> marek
>
> #! /usr/local/bin/perl
>
> use warnings;
> use strict;
>
> my $line1 =3D "Mon, 04.08.2008 =A0 =A0 =A0 61126.10 =A0 =A0 =A0 =A079071.=
30 =A0 =A0 =A0 =A03567 =A0 =A02648.00 2864.00";
> my $line2 =3D
> "Die, 05.08.2008 7:40-19:40 =A0 =A0 =A0 =A012:00 =A0 61198.70 =A0 =A0 =A0=
 =A079103.40 =A0 =A0 =A0 =A03574 =A0 =A02648.00
> 2950.70 Name1";
>
> my @array1 =3D split( /\t\s*/, $line1 );
> my @array2 =3D split( /\t\s*/, $line2 );

/\s/ here will match any whitespace character. The \t is unnecessary.

>
> my @array3;
> for (@array1) { push @array3, $_ if $_ =3D~ /^\d+(?:\.\d+)?$/ };
> =A0 =A0# do I really need a different array, to "slice out" my numbers?
> =A0 =A0# Is there not a more elegant (perlish) way to do this?
> my @array4;
> for (@array2) { push @array4, $_ if $_ =3D~ /^\d+(?:\.\d+)?$/ };
>
> my $same =3D 1;
> $same =3D $same && @array3 =3D=3D @array4;
> =A0 # this compares only the number of elements of these arrays.
> =A0 # how to iterate over each element and compare them?
>
> if ($same) {
> =A0 =A0 print "these numbers are the same!\n";
> =A0 =A0 print join( "\t", @array3 );
> =A0 =A0 print "\n";
> =A0 =A0 print join( "\t", @array4 );
> =A0 =A0 print "\n";}
>
> else {
> =A0 =A0 print "these numbers are not the same!\n\n";
> =A0 =A0 print join( "\t", @array3 );
> =A0 =A0 print "\n";
> =A0 =A0 print join( "\t", @array4 );
> =A0 =A0 print "\n";
>
> }
>
>

Looks like you want to do it this way:

# find the numbers in the split arrays
my @nums1 =3D grep { /^\d+([:.]\d+)*$/ } @array1;
my @nums2 =3D grep { /^\d+([:.]\d+)*$/ } @array2;

# to be set upon first difference
my $fail =3D 0;

# check each member by the indexes
map {
    $fail =3D 1 unless $nums1[$_] =3D=3D $nums2[$_]
} 0 .. $#nums1;


if ($fail) {
 =A0 =A0 print "these numbers are not the same!\n\n",
 =A0 =A0     join ("\t", @array3),
         "\n",
         join ("\t", @array4),
         "\n";
} else {
 =A0 =A0 print "these numbers are the same!\n",
 =A0 =A0     join ("\t", @array3),
         "\n",
         join ("\t", @array4),
         "\n";
}



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

Date: Sat, 16 Aug 2008 01:55:57 -0700 (PDT)
From: h3xx <amphetamachine@gmail.com>
Subject: Re: array comparision
Message-Id: <ee9fb397-1044-4123-b315-f1e31ece56da@m44g2000hsc.googlegroups.com>

On Aug 16, 3:45=A0am, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth Marek <ms...@podiuminternational.org>:
>
> but it would be better to use a module like Data::Compare
>
> =A0 =A0 use Data::Compare;
>
> =A0 =A0 my $same =3D Compare \@array3, \@array4;
>
> Ben

Nice! I didn't even know of that one.


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

Date: Sat, 16 Aug 2008 11:06:24 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: array comparision
Message-Id: <92dda4dm3so16nnla4mjnt8dsjmnqlqqgq@4ax.com>

h3xx <amphetamachine@gmail.com> wrote:
>On Aug 16, 12:22 am, Marek <ms...@podiuminternational.org> wrote:

>> my @array1 = split( /\t\s*/, $line1 );
>> my @array2 = split( /\t\s*/, $line2 );
>
>/\s/ here will match any whitespace character. The \t is unnecessary.

Depends on what the OP wants to match. /\t\s*/ and /\s*/ (and even /\s+/
for that matter) match different sets of strings. A plain /\s*/ neither
enforces a tab at the beginning nor at least one character.

jue


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

Date: Sat, 16 Aug 2008 12:12:32 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: array comparision
Message-Id: <1adda4p7a3epuc8aif0i2hnn65fddq3i86@4ax.com>

Marek <mstep@podiuminternational.org> wrote:

>for (@array1) { push @array3, $_ if $_ =~ /^\d+(?:\.\d+)?$/ };

The match operator defaults to $_. No need to explicitely bind $_.

>   # do I really need a different array, to "slice out" my numbers?
>   # Is there not a more elegant (perlish) way to do this?

It appears to me as if you may be looking for grep():
	@array3 = grep(/^\d+(?:\.\d+)?$/, @array1); 
	
>my $same = 1;
>$same = $same && @array3 == @array4;
>  # this compares only the number of elements of these arrays.
>  # how to iterate over each element and compare them?

I am not sure I understand. Do you want to know if _all_ numbers are
equal (i.e. the arrays have the same content) or do you want to sort the
numbers into two groups based on equal/non equal?

If the former then just loop over them, either with a C-style loop or
with a foreach loop (assuming they are equal length):

for ($i = 0; $i <  @array3, $i++) {
	$same = $same && $array3[$i] == $array4[$i];
}

or

for (@array3){
	$same = $same && $_ == shift @array4;
}

Or you can use map() in scalar context:
$diff= map( $array3[$_]==$array4[$_] ? ():(1), (0..$#array3));
print "All numbers are the same\n" unless $diff;

You can also use map() to get a list of indices for which the numbers
are equal or different although IMO grep() is the better candidate for
that:
	grep($array3[$_]==$array4[$_], 0..$#array3);

If you rather want the values instead of the indices then just return
those from map():
@same = map( $array3[$_]==$array4[$_]? ($array3[$_]) : (), 
			0..$#array3);

jue


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

Date: Sat, 16 Aug 2008 13:23:51 +0530
From: V S Rawat <vsrawat@gmail.com>
Subject: How to make PerlScript work in firefox3 on xpsp3
Message-Id: <g8612k$ebg$1@aioe.org>

How to make PerlScript work in firefox3 on xpsp3?

I had asked it in ff support group and a member answered:
--
 > Perl is not natively supported. You will need a Perl interpreter as an
 > external processor.
 >
 > You need to identify and use an external protocol handler and identify
 > what interfaces have to be used.
--

What do I do? I have latest activeperl installed on my box but I think 
browser compatibility for perlscript shouldn't really need full fledged 
perl installation, like javascript doesn't need java. Isn't it so? 
Though I would need the perl installation for other developments.

thanks.
--
V


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

Date: Sat, 16 Aug 2008 09:52:13 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: How to make PerlScript work in firefox3 on xpsp3
Message-Id: <t2hin5-4q1.ln1@osiris.mauzo.dyndns.org>


Quoth V S Rawat <vsrawat@gmail.com>:
> How to make PerlScript work in firefox3 on xpsp3?
> 
> I had asked it in ff support group and a member answered:
> --
>  > Perl is not natively supported. You will need a Perl interpreter as an
>  > external processor.
>  >
>  > You need to identify and use an external protocol handler and identify
>  > what interfaces have to be used.
> --
> 
> What do I do? I have latest activeperl installed on my box but I think 
> browser compatibility for perlscript shouldn't really need full fledged 
> perl installation, like javascript doesn't need java. Isn't it so? 

JavaScript is completely unrelated to Java. The similar names are very
unfortunate (blame Netscape's marketing department: the language was
originally called LiveScript). PerlScript, OTOH, is just perl installed
as a Windows ActiveX scripting language, so you *do* absolutely need a
full (ActiveState) perl install.

I have no idea if it's possible to use PerlScript from within Firefox. I
strongly suspect it's not: AFAIK, FF doesn't support ActiveX scripting
at all, so it won't support PerlScript either. If you can find anything
that tells you how to use VBScript (or any other ActiveX language: are
there others?) from within FF, the answer will apply to PerlScript.

The answer you were given refers to using Perl as a URL protocol
handler, without bothering with PerlScript. FF allows you to create your
own URL schemes, so you could define perl:// URLs which you could
(somehow) associate with an appropriate interpreter. I don't think you
could (easily) get at the DOM, though, as you can with JavaScript.

Basically: I think what you're trying to do can't be done, and any
further questions about it belong in a Firefox group, not here.

Ben

-- 
You poor take courage, you rich take care:
The Earth was made a common treasury for everyone to share
All things in common, all people one.
'We come in peace'---the order came to cut them down.       [ben@morrow.me.uk]


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

Date: Sat, 16 Aug 2008 16:52:01 +0530
From: V S Rawat <vsrawat@gmail.com>
Subject: Re: How to make PerlScript work in firefox3 on xpsp3
Message-Id: <g86dif$2i9$1@aioe.org>

On 8/16/2008 2:22 PM India Time, _Ben Morrow_ wrote:

> Quoth V S Rawat <vsrawat@gmail.com>:
>> How to make PerlScript work in firefox3 on xpsp3?
>>
>> I had asked it in ff support group and a member answered:
>> --
>>  > Perl is not natively supported. You will need a Perl interpreter as an
>>  > external processor.
>>  >
>>  > You need to identify and use an external protocol handler and identify
>>  > what interfaces have to be used.
>> --
>>
>> What do I do? I have latest activeperl installed on my box but I think 
>> browser compatibility for perlscript shouldn't really need full fledged 
>> perl installation, like javascript doesn't need java. Isn't it so? 
> 
> JavaScript is completely unrelated to Java. The similar names are very
> unfortunate (blame Netscape's marketing department: the language was
> originally called LiveScript). PerlScript, OTOH, is just perl installed
> as a Windows ActiveX scripting language, so you *do* absolutely need a
> full (ActiveState) perl install.
> 
> I have no idea if it's possible to use PerlScript from within Firefox. I
> strongly suspect it's not: AFAIK, FF doesn't support ActiveX scripting
> at all, so it won't support PerlScript either. If you can find anything
> that tells you how to use VBScript (or any other ActiveX language: are
> there others?) from within FF, the answer will apply to PerlScript.
> 
> The answer you were given refers to using Perl as a URL protocol
> handler, without bothering with PerlScript. FF allows you to create your
> own URL schemes, so you could define perl:// URLs which you could
> (somehow) associate with an appropriate interpreter. I don't think you
> could (easily) get at the DOM, though, as you can with JavaScript.
> 
> Basically: I think what you're trying to do can't be done, and any
> further questions about it belong in a Firefox group, not here.
> 
> Ben
> 

Thanks, Ben. A disappointing answer, but the bitter truth is truth.

Google threw the following page adding the same:
http://www.perlmonks.org/?node_id=664307
--
Re: Firefox Script
by wfsp (Monsignor) on Jan 25, 2008 at 16:58 UTC

       The Active Perl 
http://aspn.activestate.com/ASPN/docs/ActivePerl/5.10/Components/Windows/PerlScript.html 
docs say:

           PerlScript is an ActiveX scripting engine that allows you to 
use Perl with any ActiveX scripting host. At this time, ActiveX 
scripting hosts include:

           Internet Information Server 3.0/4.0/5.0
           Peer Web Services 3.0/4.0
           Microsoft Internet Explorer 5.0x
           Windows Scripting Host
--


No FF. :-(

k. would try it on ie6.
-- 
V


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

Date: Sat, 16 Aug 2008 02:05:47 -0700 (PDT)
From: h3xx <amphetamachine@gmail.com>
Subject: List Context in a Boolean Expression
Message-Id: <29bc9798-8f15-4295-9d8d-ccc5ea3adfc8@m36g2000hse.googlegroups.com>

I have a question about when things are and aren't taken to be a list
when doing boolean comparisons. I tested the following code:

my @foo = qw/ one two three /;
my @bar = ();

my @baz = @bar || @foo;
print "@baz\n";

This produces "one two three." Hence, we know that a list CAN be
returned from a boolean expression. I tried it the other way:

my @baz = @foo || @bar;
print "@baz\n";

This produced "3," the scalar evaluation of @foo. This is the same for
any amount of parentheses and using the "or" operand instead of "||."
Now, what happened?


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

Date: Sat, 16 Aug 2008 12:21:23 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: List Context in a Boolean Expression
Message-Id: <qchda4l8cq0bssn0l34nkfk7slske8mirs@4ax.com>

h3xx <amphetamachine@gmail.com> wrote:
>I have a question about when things are and aren't taken to be a list
>when doing boolean comparisons. I tested the following code:
>
>my @foo = qw/ one two three /;
>my @bar = ();
>
>my @baz = @bar || @foo;
>print "@baz\n";
>
>This produces "one two three." Hence, we know that a list CAN be
>returned from a boolean expression. I tried it the other way:
>
>my @baz = @foo || @bar;
>print "@baz\n";
>
>This produced "3," the scalar evaluation of @foo. This is the same for
>any amount of parentheses and using the "or" operand instead of "||."
>Now, what happened?

See The Fine Manual: perldoc perlop, section  "C-style Logical Or":
   The "||" and "&&" [...] return the last value evaluated. 
and
    In particular, this means that you shouldn't use this for selecting
    between two aggregates for assignment:
        @a = @b || @c;              # this is wrong

jue


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

Date: Sat, 16 Aug 2008 04:42:21 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Aug 16 2008
Message-Id: <K5oFqL.2Do@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.

CPAN-Mini-Webserver-0.37
http://search.cpan.org/~lbrocard/CPAN-Mini-Webserver-0.37/
Search and browse Mini CPAN 
----
Crypt-Rijndael-1.07
http://search.cpan.org/~bdfoy/Crypt-Rijndael-1.07/
Crypt::CBC compliant Rijndael encryption module 
----
DBD-Ingres-0.5208
http://search.cpan.org/~sreagle/DBD-Ingres-0.5208/
DBI driver for Ingres database systems 
----
DBD-mysql-4.008
http://search.cpan.org/~capttofu/DBD-mysql-4.008/
MySQL driver for the Perl5 Database Interface (DBI) 
----
Devel-NYTProf-2.03
http://search.cpan.org/~timb/Devel-NYTProf-2.03/
Powerful feature-rich perl source code profiler 
----
Devel-NYTProf-2.03_1
http://search.cpan.org/~timb/Devel-NYTProf-2.03_1/
Powerful feature-rich perl source code profiler 
----
Getopt-Hash-0.01
http://search.cpan.org/~blair/Getopt-Hash-0.01/
Process command line options based upon convention rather than configuration. 
----
Graphics-Color-0.09
http://search.cpan.org/~gphat/Graphics-Color-0.09/
Device and library agnostic color spaces. 
----
Graphics-Color-0.10
http://search.cpan.org/~gphat/Graphics-Color-0.10/
Device and library agnostic color spaces. 
----
Graphics-Color-0.11
http://search.cpan.org/~gphat/Graphics-Color-0.11/
Device and library agnostic color spaces. 
----
HTML-Feature-2.00005
http://search.cpan.org/~miki/HTML-Feature-2.00005/
Extract Feature Sentences From HTML Documents 
----
HTML-FormWidgets-0.1.72
http://search.cpan.org/~pjfl/HTML-FormWidgets-0.1.72/
Create HTML form markup 
----
Hash-Param-0.01
http://search.cpan.org/~rkrimen/Hash-Param-0.01/
CGI/Catalyst::Request-like parameter-hash accessor/mutator 
----
IO-Lambda-0.27
http://search.cpan.org/~karasik/IO-Lambda-0.27/
non-blocking I/O in lambda style 
----
List-Enumerator-0.05
http://search.cpan.org/~satoh/List-Enumerator-0.05/
list construct library 
----
Log-Log4perl-CommandLine-0.05
http://search.cpan.org/~ctilmes/Log-Log4perl-CommandLine-0.05/
Simple Command Line Interface for Log4perl 
----
Mac-Path-Util-0.26
http://search.cpan.org/~bdfoy/Mac-Path-Util-0.26/
convert between darwin and Mac paths 
----
Make-Cache-1.044
http://search.cpan.org/~wsnyder/Make-Cache-1.044/
Caching of object and test run information 
----
Module-Extract-Use-0.10_01
http://search.cpan.org/~bdfoy/Module-Extract-Use-0.10_01/
Pull out the modules a module uses 
----
Module-LocalBuild-1.010
http://search.cpan.org/~wsnyder/Module-LocalBuild-1.010/
Support routines for setting up perltools area 
----
Muldis-D-0.45.0
http://search.cpan.org/~duncand/Muldis-D-0.45.0/
Formal spec of Muldis D relational DBMS lang 
----
MyCPAN-Indexer-0.10_02
http://search.cpan.org/~bdfoy/MyCPAN-Indexer-0.10_02/
Index a Perl distribution 
----
Net-SMS-Mollie-0.04
http://search.cpan.org/~blom/Net-SMS-Mollie-0.04/
Send SMS messages via the mollie.nl service 
----
Object-Disoriented-0.01
http://search.cpan.org/~arc/Object-Disoriented-0.01/
remove object-orientation from modules 
----
POE-Component-RemoteTail-0.01003
http://search.cpan.org/~miki/POE-Component-RemoteTail-0.01003/
tail to remote server's access_log on ssh connection. 
----
POE-Component-RemoteTail-0.01004
http://search.cpan.org/~miki/POE-Component-RemoteTail-0.01004/
tail to remote server's access_log on ssh connection. 
----
POE-XS-Loop-EPoll-0.001
http://search.cpan.org/~tonyc/POE-XS-Loop-EPoll-0.001/
an XS implementation of POE::Loop, using Linux` epoll(2). 
----
Parse-Marpa-0.214000
http://search.cpan.org/~jkegl/Parse-Marpa-0.214000/
Earley's algorithm with LR(0) precomputation 
----
RT-Client-REST-0.37
http://search.cpan.org/~dmitri/RT-Client-REST-0.37/
talk to RT installation using REST protocol. 
----
Rose-DBx-Object-Renderer-0.27
http://search.cpan.org/~danny/Rose-DBx-Object-Renderer-0.27/
Web UI Rendering for Rose::DB::Object 
----
SourceCode-LineCounter-Perl-0.10_02
http://search.cpan.org/~bdfoy/SourceCode-LineCounter-Perl-0.10_02/
Count lines in Perl source code 
----
Statistics-Zscore-0.00001
http://search.cpan.org/~miki/Statistics-Zscore-0.00001/
Simple scoring module that uses statistics STANDARD SCORE. 
----
Term-ProgressBar-Simple-0.01
http://search.cpan.org/~evdb/Term-ProgressBar-Simple-0.01/
simpler progress bars 
----
Test-HTTPStatus-1.08
http://search.cpan.org/~bdfoy/Test-HTTPStatus-1.08/
check an HTTP status 
----
Test-Kit-0.02
http://search.cpan.org/~ovid/Test-Kit-0.02/
Build custom test packages with only the features you want. 
----
Test-UniqueNames
http://search.cpan.org/~heumann/Test-UniqueNames/
Make sure all of your tests have unique names 
----
Text-WagnerFischer-Armenian-0.01
http://search.cpan.org/~aurum/Text-WagnerFischer-Armenian-0.01/
a subclass of Text::WagnerFischer for Armenian-language strings 
----
Unix-Processors-2.040
http://search.cpan.org/~wsnyder/Unix-Processors-2.040/
Interface to processor (CPU) information 
----
WWW-Myspace-0.83
http://search.cpan.org/~grantg/WWW-Myspace-0.83/
Access MySpace.com profile information from Perl 
----
XML-Compile-SOAP-0.77
http://search.cpan.org/~markov/XML-Compile-SOAP-0.77/
base-class for SOAP implementations 
----
XRI-Resolution-Lite-0.02
http://search.cpan.org/~zigorou/XRI-Resolution-Lite-0.02/
The Lightweight client module for XRI Resolution 


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: Fri, 15 Aug 2008 22:37:02 +0300
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: perlish way for ( 0 .. $n) , but downcounting
Message-Id: <uf2hn5x0nl.ln2@carpet.zombinet>

xhoster@gmail.com wrote:
> Eric Pozharski <whynot@pozharski.name> wrote:
*SKIP*
>> Don't guess, benchmark first!

> But benchmark something that makes sense.  None of the benchmarks you
> posted make any sense in this context.

Yes, I've seen the light.  My fault.  I was misguided by
C<@a = (0 .. 9)> and then C<@a = reverse (0 .. 9)>.

> You need to use an example large enough to actually make a noticable
> dent in memory, and you need to use the construct in question, which
> was the range operators used directly in a foreach, with or without a
> reverse, not a array being created first and then used in a foreach.

I should slightly disagree with that.  The impact was noticable enough
comparing to void (it was at the bottom).

However, I've made some experiments yet.  And found that if a list would
have been created explicitly, then C<foreach (reverse @l)> doesn't
create reversed copy.

*SKIP*
> perl -le 'foreach (reverse 1..1e6) {}; print +(`ps -p $$ -o rss `)[1];'
> 72072

I've got 11K pages (44Kb) for that.  64bit?  Then, I think, I've lost
that ball.  Pity on me.

*CUT*

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


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

Date: Sat, 16 Aug 2008 02:56:22 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: perlish way for ( 0 .. $n) , but downcounting
Message-Id: <6nohn5-6uq.ln1@osiris.mauzo.dyndns.org>


Quoth Eric Pozharski <whynot@pozharski.name>:
> 
> However, I've made some experiments yet.  And found that if a list would
> have been created explicitly, then C<foreach (reverse @l)> doesn't
> create reversed copy.

That is correct. Examining the code (pp_enteriter in pp_ctl.c) shows
that

    1. if the argument to for() is just a range, it iterates without
    creating the whole range;

    2. if the argument is reverse(LIST), it expands LIST and then
    iterates over it backwards;

    3. otherwise, it expands the whole list.

Smells like an opportunity for a minor optimization patch... :)

Ben

-- 
   Razors pain you / Rivers are damp
   Acids stain you / And drugs cause cramp.                    [Dorothy Parker]
Guns aren't lawful / Nooses give
  Gas smells awful / You might as well live.                   ben@morrow.me.uk


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

Date: Fri, 15 Aug 2008 21:55:39 -0400
From: John W Kennedy <jwkenne@attglobal.net>
Subject: Re: This is very OT, and its just a request. It has to do with Ashton Tate Framework 2/PC World contest in the 1980's
Message-Id: <48a633f6$0$7323$607ed4bc@cv.net>

sln@netherlands.com wrote:
> It was recently brought to my attention, that my phrases,
> my software phrase descriptions and in particular "Action Memo",
> "Action Item's" are used heavily in contact management software
> programs.

A mere name is neither patentable nor copyrightable. It can be 
trademarked, but you have made no attempt to do so. If you go to a 
lawyer with this story, he will laugh at you and then bill you about 
€350 for wasting his time.
-- 
John W. Kennedy
  "The first effect of not believing in God is to believe in anything...."
   -- Emile Cammaerts, "The Laughing Prophet"


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

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


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