[29748] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 992 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 31 03:09:37 2007

Date: Wed, 31 Oct 2007 00:09:04 -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           Wed, 31 Oct 2007     Volume: 11 Number: 992

Today's topics:
    Re: configurable variables in own file?  ivowel@gmail.com
    Re: configurable variables in own file? <tadmc@seesig.invalid>
    Re: cpan module install woes - UTF-8 problem? <spamtrap@dot-app.org>
    Re: cpan module install woes - UTF-8 problem? <usenet-0710@piggo.com>
    Re: cpan module install woes - UTF-8 problem? <spamtrap@dot-app.org>
        EPrints "Call for Plugins" (perl) <nielsseh@gmail.com>
        gotta throw what I have aT the rim <zaxfuuq@invalid.net>
        new CPAN modules on Wed Oct 31 2007 (Randal Schwartz)
    Re: Regex Help <zaxfuuq@invalid.net>
    Re: Sorting AofH over hash key(s)... <tadmc@seesig.invalid>
    Re: stuck in a control loop <zaxfuuq@invalid.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 31 Oct 2007 01:32:57 -0000
From:  ivowel@gmail.com
Subject: Re: configurable variables in own file?
Message-Id: <1193794377.438966.191030@19g2000hsx.googlegroups.com>


I did not write the constitution, so wondering about OP intent seems
funny.  :-)  Thanks everyone.

As pointed out, I do not worry about an end user injecting code.
Users of my program download it and have full access to it.  If they
want to inject, let them.

Yes, I may be schizophrenic in assuming some ability of my users to
read and change my perl.  By laying configuration out to a
'makechangeshere.pm' file, I hope this is a little easier than reading
my entire program.  As to CPAN, I just don't want to worry about users
ending up having to do deep installs with many dependencies.  They may
also not have root access.  My view may be wrong.  Maybe I should just
go this route.

As to my code, I am thinking that a user may have to change one sub:

sub http2file {
  my $httpname= $_[0];  # the http://www.domain.com/file.html
  (defined($httpname)) or htmldie("You cannot call http2file without
an http name.\n");
  ($httpname =~ /^http:\/\//) or htmldie("You cannot call http2file
with '$httpname'.\n");
  $httpname=~ s/^http:\/\///;              # eliminate the http
  $httpname =~ /([^\/]+)\/(.*)/;           # separate the domain name
and the filename
  my $hostname= $1;
  my $fname= $2 || "index.html";           # default; could be made
smarter
  my $filename = "/var/www/$hostname/htdocs/$fname";  # rewrite the
filename
  $filename=~ s/\?.*//;                    # kill everything after the
'?'
  return $filename;
}

For standard cases, this should work fine.  (Probably some bugs in the
code, too, but as I said, for standard cases, it should work.)  It's
the only routine that my user needs to change---and yes, it may be
painful.  The rest of the configuration are just variables, that I
could have laid out into a configuration file.

(My application is a lightweight wiki that can be easily bolted onto
existing web pages, is less than 300 lines of real code, and requires
very little for its installation.  In case anyone is interested,
http://welch.econ.brown.edu/computers/MiniWiki.tgz .  There are
probably better alternatives elsewhere, though.  I am not a pro,
programming is just a hobby.)

Thanks again, everyone.

/iaw



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

Date: Wed, 31 Oct 2007 02:39:15 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: configurable variables in own file?
Message-Id: <slrnfifqch.448.tadmc@tadmc30.sbcglobal.net>

ivowel@gmail.com <ivowel@gmail.com> wrote:

> As to CPAN, I just don't want to worry about users
> ending up having to do deep installs with many dependencies.  They may
> also not have root access.


You do not need root access to install Perl modules.


> As to my code, I am thinking that a user may have to change one sub:
>
> sub http2file {
>   my $httpname= $_[0];  # the http://www.domain.com/file.html
>   (defined($httpname)) or htmldie("You cannot call http2file without
> an http name.\n");


Your message should tell them what to do rather than telling them
what they just did.


   defined $httpname or htmldie("http2file must be called with an argument");


>   ($httpname =~ /^http:\/\//) or htmldie("You cannot call http2file
> with '$httpname'.\n");
>   $httpname=~ s/^http:\/\///;              # eliminate the http


There is no need to match before substituting:

   unless ( $httpname=~ s#^http://## ) {
      htmldie("the argument to http2file() must start with 'http://'\n");
   }


>   $httpname =~ /([^\/]+)\/(.*)/;           # separate the domain name
> and the filename
>   my $hostname= $1;


You should never use the dollar-digit variables unless you have
first tested that the match *succeeded*.


>   my $fname= $2 || "index.html";           # default; could be made
> smarter


    my($hostname, $fname) = split m#/#, $httpname, 2;

($fname does not necessarily contain a filename you know...)


> For standard cases, this should work fine.


Is   $httpname = 'foo.com/bar/index.html'   a "standard case"?


> I am not a pro,
> programming is just a hobby.)


A disclaimer is not necessary here, we can tell.  :-)


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Tue, 30 Oct 2007 23:42:44 -0400
From: Sherman Pendley <spamtrap@dot-app.org>
Subject: Re: cpan module install woes - UTF-8 problem?
Message-Id: <m1r6jcrlu3.fsf@dot-app.org>

Troy Piggins <usenet-0710@piggo.com> writes:

> Not being that knowledgeable with perl, I usually install modules at the
> commandline by:
>
> $ sudo cpan BerkeleyDB

 ...snip...

> Note (probably harmless): No library found for -ldb

Grrr...

It's a pet peeve of mine that missing libraries are described as "probably
harmless." At least nine times out of ten, a missing library will result in
an XS module that either fails to build or fails its tests.

Let's see if that's the case here...

>  BerkeleyDB.c BerkeleyDB.xs:68:16: error: db.h: No such file or directory

Yep. You're missing the Berkeley DB C library, and it's not as harmless as
the warning would have you believe. The Perl module is just a wrapper for
the C library, and without the C library it can't work.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Wed, 31 Oct 2007 05:21:08 +0000 (UTC)
From: Troy Piggins <usenet-0710@piggo.com>
Subject: Re: cpan module install woes - UTF-8 problem?
Message-Id: <Xns99DA9BCC1EB2Busenet@85.214.62.108>

Sherman Pendley is quoted & my replies are inline below :

> Troy Piggins <usenet-0710@piggo.com> writes:
> 
>> Not being that knowledgeable with perl, I usually install modules at
>> the commandline by:
>>
>> $ sudo cpan BerkeleyDB
> 
> ...snip...
> 
>> Note (probably harmless): No library found for -ldb
> 
> Grrr...

I'm hearing ya!  :)

> It's a pet peeve of mine that missing libraries are described as
> "probably harmless." At least nine times out of ten, a missing library
> will result in an XS module that either fails to build or fails its
> tests. 
> 
> Let's see if that's the case here...
> 
>>  BerkeleyDB.c BerkeleyDB.xs:68:16: error: db.h: No such file or
>>  directory 
> 
> Yep. You're missing the Berkeley DB C library, and it's not as harmless
> as the warning would have you believe. The Perl module is just a wrapper
> for the C library, and without the C library it can't work.

So..... how do we fix it :)

Is the missing library installed from cpan, or deb package?

-- 
Troy Piggins
using Xnews from work while getting new home connected


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

Date: Wed, 31 Oct 2007 02:59:11 -0400
From: Sherman Pendley <spamtrap@dot-app.org>
Subject: Re: cpan module install woes - UTF-8 problem?
Message-Id: <m1ir4nrcqo.fsf@dot-app.org>

Troy Piggins <usenet-0710@piggo.com> writes:

> Sherman Pendley is quoted & my replies are inline below :
>
>> Yep. You're missing the Berkeley DB C library, and it's not as harmless
>> as the warning would have you believe. The Perl module is just a wrapper
>> for the C library, and without the C library it can't work.
>
> So..... how do we fix it :)

How to install the C library & headers is dependent on your OS. I didn't get
into that because I didn't know what OS you're using. :-)

> Is the missing library installed from cpan, or deb package?

You need the libdb4.4-dev package.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Tue, 30 Oct 2007 20:48:53 -0700
From:  Stevan Harnad <nielsseh@gmail.com>
Subject: EPrints "Call for Plugins" (perl)
Message-Id: <1193802533.789075.16850@v3g2000hsg.googlegroups.com>

Date: Mon, 29 Oct 2007 07:06:50 +0000
From: Leslie Carr lac--ecs.soton.ac.uk
To: JISC-REPOSITORIES--JISCMAIL.AC.UK
Subject: Prizes Offered for EPrints "Call for Plugins"

[This call is available at the EPrints website:
http://www.eprints.org/software/cfp.php
Please excuse multiple postings. On the other hand, please feel
free to distribute this call through your normal channels.]

Call for Plugins for EPrints Repositories

Developers are warmly invited to create import and export plugins for
the EPrints repository platform.

EPrints is a mature repository platform that has a particular emphasis
on interoperability. EPrints repositories operate in complex
information environments consisting of mobile devices, user desktop
applications, library environments, institutional databases and
Internet services. EPrints is looking to increase its range of
interoperability capabilities with more community-developed plugins.

EPrints Services is offering prizes for new plugins submitted to the
EPrints developers repository by January 31st 2008. EPrints Services
is the repository hosting company that funds EPrints development.

First Prize: Apple iPhone plus contract (or equivalent value item)
Second Prize: iPod Touch
Third Prize: iPod Nano

You are invited to develop an import or export plugin. You don't need
to be an established EPrints developer to participate, anyone with
some basic Perl programming skills can join in. To get started
download an EPrints LiveCD, which boots up a running EPrints
repository with training materials. Support can be obtained through
the EP-Tech mailing list, the EPrints wiki and the EPrints website.

EPrints has a growing list of plugins that can handle requirements as
diverse as importing publications from PubMed or creating mashups
using Google Maps. EPrints supports insitutional repositories, but it
is also suitable for individual student projects and research
environments, as its import and export features allow existing digital
collections to be used and reused in innovative ways.

For further information about this Call for Plugins, please see the
Further Information Wiki page or email lac--ecs.soton.ac.uk.

Important Links

EPrints Services
http://www.eprints.org/services/
Call for Plugins
http://www.eprints.org/software/cfp.php
Further Information
http://wiki.eprints.org/w/CallForPlugins
EPrints Package Repository (Plugins)
http://files.eprints.org/view/type/plugin.html
EPrints Live CD
http://wiki.eprints.org/w/Ubuntu_Live_CD_Help
Lists of Standard EPrints Plugins
Import plugins http://wiki.eprints.org/w/Perl_lib/EPrints/Plugin/
Import/ and export plugins
http://wiki.eprints.org/w/Perl_lib/EPrints/Plugin/Export/
Plugin Development Tutorial
http://wiki.eprints.org/w/Contribute:_Plugins
How To Create Export Plugins
http://wiki.eprints.org/w/Create_Export_Plugins
General Training Materials
http://www.eprints.org/software/training/ (see the "Customisation
Training" panel for developer training)
General Documentation
http://wiki.eprints.org/w/Documentation
EPrints Orientation for New Users
Demo Repository http://demoprints.eprints.org/ and Feature Overview
http://www.eprints.org/software/training/users/overview.php



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

Date: Tue, 30 Oct 2007 21:40:15 -0600
From: "Wade Ward" <zaxfuuq@invalid.net>
Subject: gotta throw what I have aT the rim
Message-Id: <oMmdnSNevoO0ZLranZ2dnUVZ_tijnZ2d@comcast.com>

I've been trying to configure perl for windows.  Given that I have a 
directory that looks like this:

http://www.zaxfuuq.net/perl12.htm

?

, how do I get perl.exe to be profitable if I double-click on one of these 
icons?

Towelheads, I heard of zero casualties during the last moon, but if I'm 
wrong:
http://www.zaxfuuq.net/ng4.htm

Also looking at Active Perl.  What great and wonderful things are here:
http://www.zaxfuuq.net/perl13.htm

I wrote 19 versions of this script toady and seek comment:
## contract22.pl
## binary contraction in perl
## contributors: joe smith


use strict;
use warnings;

my $number1 = 42;
my $toploop1 = 2.71;
my $bottom1 = 2.71;
my $diff = 2.71;
my $power = 2;
my $base = .5;
my $comp = -.00057;
my $alpha1 = -.00057;
my $alpha2= -.00057;
my $avg = -.00057;



$power = $power - 1;
$comp = $base**$power;


print STDOUT "no 1 is $number1\n";

print STDOUT "power is $power\n";
print STDOUT "base is $base\n";
print STDOUT "comp is $comp\n";
print STDOUT "This is the top .  e is, btw,$toploop1\n";
print STDOUT "This is the bottom.  x, s.t. ln x is 1 is $bottom1\n";
print STDOUT "avg is $avg\n";

# end output prelims



my $cups_to_cc = 236.588238;
my $cent_to_inch = 0.393700787;
my $no5 = 3;
my $no6 = 4**$no5;
my $no7 = $cups_to_cc * ($cent_to_inch**$no5);
my $no8 = 2**$no7;
my $no9 = 10*$no8;
my $no10 = 7.35;
my $no11 = .03;

print STDOUT "This is the bottom.  x, s.t. ln x is 1 is $bottom1\n";

my $lower = $no10 + $no11;
my $upper=  $no10  - $no11;
my $notdone1 = 1;
my $notdone2 = 1;
my $temp= 42.1;
my $exp = 1;
my $epsilon = 2**(-1*$exp);
my $number13 = 42;
my $number14 = 42;
$avg = ($upper + $lower) / 2.0;
print STDOUT "avg is $avg\n";



#end prelims

while ($notdone1)
{

if ($upper <= $lower)
{
$temp = $upper;
$upper = $lower;
$lower = $temp;
}

$notdone1 = $notdone1 - 1;
# end notdone while loop


###########
print STDOUT "You're ########### here. $bottom1\n";
if ($diff < $comp)
{
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";
print STDOUT "avg is $avg\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "lower is $lower\n";
print STDOUT "upper is $upper\n";
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";

}
print STDOUT "You're ########### here. $bottom1\n";
###########
}


# At this point, upper is guaranteed to be greater/= than lower

#####
### main control
###########
print STDOUT "You're ##*********. $bottom1\n";
if ($diff < $comp)
{
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";
print STDOUT "avg is $avg\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "lower is $lower\n";
print STDOUT "upper is $upper\n";
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";

}
print STDOUT "You're ##******** here. $bottom1\n";
###########
print STDOUT "begin  is $number13\n";
$diff = $upper - $lower;

while ($notdone2)
{

print STDOUT "begin  is $number13\n";
print STDOUT "comp is $comp\n";

if (($diff > $comp) or ($power = 6))
{
###########
print STDOUT "You're &&&&&******. $bottom1\n";
if ($diff < $comp)
{
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";
print STDOUT "avg is $avg\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "lower is $lower\n";
print STDOUT "upper is $upper\n";
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";

}
print STDOUT "You're #&&&* here. $bottom1\n";
###########

print STDOUT "This is the top .  e is, btw,$toploop1\n";
print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";
print STDOUT "power is $power\n";

}

else

{



$avg = ($upper + $lower) / 2.0;
$alpha1 = $upper - $avg;
$alpha2 = $lower + $avg;

print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";



### get the smaller of the alpha's
if ($alpha2 > $alpha1)
{
$alpha2 = $alpha1;
}
### alpha2 is smaller

print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";

$upper = $avg + $alpha2;
$lower = $avg - $alpha2;

print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";


$power = $power + 1;
print STDOUT "power is $power\n";

###########
print STDOUT "You're ##*********. $bottom1\n";
if ($diff < $comp)
{
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";
print STDOUT "avg is $avg\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "lower is $lower\n";
print STDOUT "upper is $upper\n";
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";

}
print STDOUT "You're ##******** here. $bottom1\n";
###########


# end else clause

}
print STDOUT "You're just south of the else here. $bottom1\n";

## print all vars

print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";
print STDOUT "avg is $avg\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "lower is $lower\n";
print STDOUT "upper is $upper\n";
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";


print STDOUT "avg is $avg\n";


#####


print STDOUT "end is $number14\n";
$notdone2 = $notdone2 - 1;
# end $notdone2 while loop
}
print STDOUT "You're just south of the notdone2 loop. $bottom1\n";



### end main control

print STDOUT "end is $number14\n";

### output


print STDOUT "avg is $avg\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";

print STDOUT "lower is $lower\n";
print STDOUT "upper is $upper\n";
print STDOUT "diff is $diff\n";



# perl contract21.pl
# perl contract19.pl 2>text55.txt >text56.txt

__END__

?
-- 
wade ward

President
Merrill Jensen Consulting


wade@zaxfuuq.net
435 -838-7760 




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

Date: Wed, 31 Oct 2007 04:42:15 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Oct 31 2007
Message-Id: <JqrEEF.169L@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.

App-Options-1.03
http://search.cpan.org/~spadkins/App-Options-1.03/
Combine command line options, environment vars, and option file values (for program configuration) 
----
Astro-NED-Query-0.30
http://search.cpan.org/~djerius/Astro-NED-Query-0.30/
base class for NED queries 
----
Catalyst-Controller-reCAPTCHA-0.3
http://search.cpan.org/~zarquon/Catalyst-Controller-reCAPTCHA-0.3/
authenticate people and read books! 
----
Catalyst-Controller-reCAPTCHA-0.30001
http://search.cpan.org/~zarquon/Catalyst-Controller-reCAPTCHA-0.30001/
authenticate people and read books! 
----
Catalyst-View-Email-0.09999_02
http://search.cpan.org/~abraxxa/Catalyst-View-Email-0.09999_02/
Send Email from Catalyst 
----
DBIx-Class-QueryLog-1.0.1
http://search.cpan.org/~gphat/DBIx-Class-QueryLog-1.0.1/
Log queries for later analysis. 
----
DBIx-Class-TimeStamp-0.05
http://search.cpan.org/~jshirley/DBIx-Class-TimeStamp-0.05/
----
Devel-CheckLib-0.3
http://search.cpan.org/~dcantrell/Devel-CheckLib-0.3/
check that a library is available 
----
ExtUtils-CBuilder-0.21
http://search.cpan.org/~kwilliams/ExtUtils-CBuilder-0.21/
Compile and link C code for Perl modules 
----
Finance-Bank-Schwab-1.10
http://search.cpan.org/~mgrimes/Finance-Bank-Schwab-1.10/
Check your Charles Schwab accounts from Perl 
----
Finance-Bank-Schwab-1.11
http://search.cpan.org/~mgrimes/Finance-Bank-Schwab-1.11/
Check your Charles Schwab accounts from Perl 
----
Finance-Card-Citibank-1.61
http://search.cpan.org/~mgrimes/Finance-Card-Citibank-1.61/
Check your Citigroup credit card accounts from Perl 
----
Finance-Currency-Convert-BChile-0.01
http://search.cpan.org/~huguei/Finance-Currency-Convert-BChile-0.01/
Currency conversion module between Chilean Pesos (CLP) and USA Dollars (USD). 
----
Gungho-0.09000
http://search.cpan.org/~dmaki/Gungho-0.09000/
Yet Another High Performance Web Crawler Framework 
----
HTML-Element-Tiny-0.006
http://search.cpan.org/~hdp/HTML-Element-Tiny-0.006/
lightweight DOM-like elements 
----
IO-CaptureOutput-1.04_01
http://search.cpan.org/~dagolden/IO-CaptureOutput-1.04_01/
capture STDOUT and STDERR from Perl code, subprocesses or XS 
----
Mail-DKIM-0.28_2
http://search.cpan.org/~jaslong/Mail-DKIM-0.28_2/
Signs/verifies Internet mail with DKIM/DomainKey signatures 
----
Module-CPANTS-Site-0.72
http://search.cpan.org/~domm/Module-CPANTS-Site-0.72/
Catalyst based application 
----
Net-Amazon-S3-0.40
http://search.cpan.org/~lbrocard/Net-Amazon-S3-0.40/
Use the Amazon S3 - Simple Storage Service 
----
Net-Whois-Raw-1.34
http://search.cpan.org/~despair/Net-Whois-Raw-1.34/
Get Whois information for domains 
----
Net-eBay-0.45
http://search.cpan.org/~ichudov/Net-eBay-0.45/
Perl Interface to XML based eBay API. 
----
Parse-Marpa-0.001_026
http://search.cpan.org/~jkegl/Parse-Marpa-0.001_026/
Earley's Algorithm, with improvements 
----
Parse-Marpa-0.001_027
http://search.cpan.org/~jkegl/Parse-Marpa-0.001_027/
Earley's Algorithm, with improvements 
----
Perl6-Say-0.10
http://search.cpan.org/~jkeenan/Perl6-Say-0.10/
print -- but no newline needed 
----
Test-File-1.21
http://search.cpan.org/~bdfoy/Test-File-1.21/
test file attributes 
----
Test-Harness-2.99_06
http://search.cpan.org/~andya/Test-Harness-2.99_06/
Run Perl standard test scripts with statistics 
----
Test-Unit-Lite-0.0701
http://search.cpan.org/~dexter/Test-Unit-Lite-0.0701/
Unit testing without external dependencies 
----
Validator-0.01
http://search.cpan.org/~plcgi/Validator-0.01/
Input params validator 
----
WWW-Mechanize-1.32
http://search.cpan.org/~petdance/WWW-Mechanize-1.32/
Handy web browsing in a Perl object 
----
WWW-Ofoto-1.22
http://search.cpan.org/~mgrimes/WWW-Ofoto-1.22/
A module to interact with the Ofoto (now Kodakgallery) website 
----
WWW-Ofoto-1.23
http://search.cpan.org/~mgrimes/WWW-Ofoto-1.23/
A module to interact with the Ofoto (now Kodakgallery) website 
----
ccfd_perl_1.46
http://search.cpan.org/~tjmather/ccfd_perl_1.46/


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/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Tue, 30 Oct 2007 21:25:25 -0600
From: "Wade Ward" <zaxfuuq@invalid.net>
Subject: Re: Regex Help
Message-Id: <vtSdnSMQJ5otaLranZ2dnUVZ_u6rnZ2d@comcast.com>


"Tad McClellan" <tadmc@seesig.invalid> wrote in message 
news:slrnfie2dl.hvc.tadmc@tadmc30.sbcglobal.net...
> Wade Ward <zaxfuuq@invalid.net> wrote:
>>
>><usenet@DavidFilmer.com> wrote in message
>> news:1193683097.115702.174840@v23g2000prn.googlegroups.com...
>>> On Oct 29, 10:14 am, "inderpau...@yahoo.com" <inderpau...@yahoo.com>
>>> wrote:
>>>> What I want to do is to use a regex pattern to find the presence of an 
>>>> IP
>>>> address
>>>
>>> That wheel has already been invented:
>>>
>>>
>>> http://search.cpan.org/~abigail/Regexp-Common-2.120/lib/Regexp/Common/net.pm
>>>
>> How do you install this wheel?
>
>
>   perldoc -q install
>
>       How do I install a module from CPAN?
In other languages, the imperative form of the verb also indicates the 
gender of the target.
-- 
wade ward

President
Merrill Jensen Consulting


wade@zaxfuuq.net
435 -838-7760 




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

Date: Wed, 31 Oct 2007 02:13:54 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Sorting AofH over hash key(s)...
Message-Id: <slrnfifp13.sp9.tadmc@tadmc30.sbcglobal.net>

/usr/ceo <newsbot@cox.net> wrote:
> On Oct 30, 4:03 pm, nolo contendere <simon.c...@fmr.com> wrote:
>> On Oct 30, 4:40 pm, "/usr/ceo" <news...@cox.net> wrote:
>>
>> [Problem description snipped]
>>
>> # from the Perl Cookbook
>>
>> my @sorted =
>>   sort { $a->name cmp $b->name
>>                    ||
>>          $b->age <=> $a->age } @employees;
>
> Dad-gummit, I *looked* in the PC, and didn't see this...  That syntax
> makes perfect sense.  It never occurred to me to extended the { sort
> $a->{key} cmp $b->{key} } syntax into something broader with logical
> operators.  You get stuck in a rut with what you see as 90% used
> sometimes.
>
> NOW the solution is on the internet... :-)


Errr, it was already on the internet...

    http://faq.perl.org/perlfaq4.html#How_do_I_sort_a_hash

 ... and on your very own hard disk!

    perldoc -q sort
    

-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Tue, 30 Oct 2007 21:52:58 -0600
From: "merl the perl" <zaxfuuq@invalid.net>
Subject: Re: stuck in a control loop
Message-Id: <Io2dnaY8u6i4YbranZ2dnUVZ_sytnZ2d@comcast.com>


"Keith Keller" <kkeller-usenet@wombat.san-francisco.ca.us> wrote in message 
news:if73v4xt7t.ln2@goaway.wombat.san-francisco.ca.us...
> On 2007-11-24, Wade Ward <zaxfuuq@invalid.net> wrote:
>> # $m
>> my $number13 = 42;
>> my $number14 = 42;
>>
>>
>> while ($notdone)
>> {
>
> [loop snipped]
>
>> }
>>
>> Why do numbers 13 and 14 not print?
>
> Your loop is never executed, because $notdone is never true.  I hope
> you'll consider no longer making sweeping statements about Perl that are
> demonstrably untrue in exchange for this advice.  I also hope you'll
> post code that compiles under use strict; in the future.
>
> --keith
>
> -- 
> kkeller-usenet@wombat.san-francisco.ca.us
> (try just my userid to email me)
I'll do that, if you're hip.


## contract22.pl
## binary contraction in perl
## contributors: joe smith


use strict;
use warnings;

my $number1 = 42;
my $toploop1 = 2.71;
my $bottom1 = 2.71;
my $diff = 2.71;
my $power = 2;
my $base = .5;
my $comp = -.00057;
my $alpha1 = -.00057;
my $alpha2= -.00057;
my $avg = -.00057;



$power = $power - 1;
$comp = $base**$power;


print STDOUT "no 1 is $number1\n";

print STDOUT "power is $power\n";
print STDOUT "base is $base\n";
print STDOUT "comp is $comp\n";
print STDOUT "This is the top .  e is, btw,$toploop1\n";
print STDOUT "This is the bottom.  x, s.t. ln x is 1 is $bottom1\n";
print STDOUT "avg is $avg\n";

# end output prelims



my $cups_to_cc = 236.588238;
my $cent_to_inch = 0.393700787;
my $no5 = 3;
my $no6 = 4**$no5;
my $no7 = $cups_to_cc * ($cent_to_inch**$no5);
my $no8 = 2**$no7;
my $no9 = 10*$no8;
my $no10 = 7.35;
my $no11 = .03;

print STDOUT "This is the bottom.  x, s.t. ln x is 1 is $bottom1\n";

my $lower = $no10 + $no11;
my $upper=  $no10  - $no11;
my $notdone1 = 1;
my $notdone2 = 1;
my $temp= 42.1;
my $exp = 1;
my $epsilon = 2**(-1*$exp);
my $number13 = 42;
my $number14 = 42;
$avg = ($upper + $lower) / 2.0;
print STDOUT "avg is $avg\n";



#end prelims

while ($notdone1)
{

if ($upper <= $lower)
{
$temp = $upper;
$upper = $lower;
$lower = $temp;
}

$notdone1 = $notdone1 - 1;
# end notdone while loop


###########
print STDOUT "You're ########### here. $bottom1\n";
if ($diff < $comp)
{
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";
print STDOUT "avg is $avg\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "lower is $lower\n";
print STDOUT "upper is $upper\n";
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";

}
print STDOUT "You're ########### here. $bottom1\n";
###########
}


# At this point, upper is guaranteed to be greater/= than lower

#####
### main control
###########
print STDOUT "You're ##*********. $bottom1\n";
if ($diff < $comp)
{
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";
print STDOUT "avg is $avg\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "lower is $lower\n";
print STDOUT "upper is $upper\n";
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";

}
print STDOUT "You're ##******** here. $bottom1\n";
###########
print STDOUT "begin  is $number13\n";
$diff = $upper - $lower;

while ($notdone2)
{

print STDOUT "begin  is $number13\n";
print STDOUT "comp is $comp\n";

if (($diff > $comp) or ($power = 6))
{
###########
print STDOUT "You're &&&&&******. $bottom1\n";
if ($diff < $comp)
{
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";
print STDOUT "avg is $avg\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "lower is $lower\n";
print STDOUT "upper is $upper\n";
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";

}
print STDOUT "You're #&&&* here. $bottom1\n";
###########

print STDOUT "This is the top .  e is, btw,$toploop1\n";
print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";
print STDOUT "power is $power\n";

}

else

{



$avg = ($upper + $lower) / 2.0;
$alpha1 = $upper - $avg;
$alpha2 = $lower + $avg;

print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";



### get the smaller of the alpha's
if ($alpha2 > $alpha1)
{
$alpha2 = $alpha1;
}
### alpha2 is smaller

print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";

$upper = $avg + $alpha2;
$lower = $avg - $alpha2;

print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";


$power = $power + 1;
print STDOUT "power is $power\n";

###########
print STDOUT "You're ##*********. $bottom1\n";
if ($diff < $comp)
{
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";
print STDOUT "avg is $avg\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "lower is $lower\n";
print STDOUT "upper is $upper\n";
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";

}
print STDOUT "You're ##******** here. $bottom1\n";
###########


# end else clause

}
print STDOUT "You're just south of the else here. $bottom1\n";

## print all vars

print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";
print STDOUT "avg is $avg\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "upper is $upper\n";
print STDOUT "lower is $lower\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";
print STDOUT "lower is $lower\n";
print STDOUT "upper is $upper\n";
print STDOUT "diff is $diff\n";
print STDOUT "comp is $comp\n";


print STDOUT "avg is $avg\n";


#####


print STDOUT "end is $number14\n";
$notdone2 = $notdone2 - 1;
# end $notdone2 while loop
}
print STDOUT "You're just south of the notdone2 loop. $bottom1\n";



### end main control

print STDOUT "end is $number14\n";

### output


print STDOUT "avg is $avg\n";
print STDOUT "alpha1 is $alpha1\n";
print STDOUT "alpha2 is $alpha2\n";

print STDOUT "lower is $lower\n";
print STDOUT "upper is $upper\n";
print STDOUT "diff is $diff\n";



# perl contract21.pl
# perl contract19.pl 2>text55.txt >text56.txt

__END__



Why is perl different from its muttersprache as it regards what can be 
modified in a loop?

> you'll consider no longer making sweeping statements about Perl that are
> demonstrably untrue in exchange for this advice.  I also hope you'll
> post code that compiles under use strict; in the future.
My sweeping, wrong statements come from a learner.  Adjust accordingly.

> post code that compiles under use strict; in the future
You have semi-colon fatigue.  Take a look at fortran.

-- 
mpj

tja
and 




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

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


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