[30102] in Perl-Users-Digest
Perl-Users Digest, Issue: 1345 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 9 09:09:43 2008
Date: Sun, 9 Mar 2008 06:09:07 -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 Sun, 9 Mar 2008 Volume: 11 Number: 1345
Today's topics:
declare structure <rose@russ.org>
Re: declare structure <kkeller-usenet@wombat.san-francisco.ca.us>
Re: declare structure <ben@morrow.me.uk>
Re: FAQ 5.1 How do I flush/unbuffer an output filehandl <hjp-usenet2@hjp.at>
finding modules in an activeperl install <invalid@invalid.net>
Re: finding modules in an activeperl install <ben@morrow.me.uk>
list of day/month names in all locales <myicq2@3gmx.net4>
Re: list of day/month names in all locales <ben@morrow.me.uk>
Re: Net::SMTP - "Bad File Number" error ? <joe@inwap.com>
new CPAN modules on Sun Mar 9 2008 (Randal Schwartz)
Re: OK I want read: IP Address properties of user's Int <joe@inwap.com>
printf doesn't do right justify <danREMOVETHESECAPSiel@agac.REMOVETHISTOO.DOMAIN_IS_DE>
Re: printf doesn't do right justify <ben@morrow.me.uk>
Trac - Does it make sense to keep http://trac.edgewall. <ilias@lazaridis.com>
Re: Two perl-specific postings on Codeaholic <Bruce.Axtens@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 9 Mar 2008 15:36:57 +0800
From: "Rose" <rose@russ.org>
Subject: declare structure
Message-Id: <fr042r$f9n$1@ijustice.itsc.cuhk.edu.hk>
One day i found some codes by others write like this way (i can't remember
the exact codes):
a[0]->idx = 1; # or => 1?
a[0]->name = "foo";
a[0]->loc = "earth";
I doubt it's OO programing but Perl in 21 Days told me that may be another
story. I'm not using associative array because i need all 3 or more
information later and associative array may not provide convenient way for
me to retrieve the information. Could anybody shed some light on what topic
I should refer to ?
------------------------------
Date: Sat, 8 Mar 2008 23:45:22 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: declare structure
Message-Id: <k5hca5xusf.ln2@goaway.wombat.san-francisco.ca.us>
On 2008-03-09, Rose <rose@russ.org> wrote:
>
> One day i found some codes by others write like this way (i can't remember
> the exact codes):
The help you will receive based on this code will be limited, then. Get
the code and repost it if possible.
> a[0]->idx = 1; # or => 1?
> a[0]->name = "foo";
> a[0]->loc = "earth";
It was probably more like
$a[0]->{idx}=1;
It could also have been (unlikely)
$a[0]->idx(1);
> I doubt it's OO programing but Perl in 21 Days told me that may be another
> story.
If the second, then it's likely OO. If the first, then it's probably
just a nested data structure.
> I'm not using associative array because i need all 3 or more
> information later and associative array may not provide convenient way for
> me to retrieve the information. Could anybody shed some light on what topic
> I should refer to ?
You've already been referred to the references documentation many times.
You should read it, or read it again more carefully this time.
--keith
--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
------------------------------
Date: Sun, 9 Mar 2008 09:09:40 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: declare structure
Message-Id: <k3mca5-mb92.ln1@osiris.mauzo.dyndns.org>
Quoth Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>:
> On 2008-03-09, Rose <rose@russ.org> wrote:
> >
> > a[0]->idx = 1; # or => 1?
> > a[0]->name = "foo";
> > a[0]->loc = "earth";
>
> It was probably more like
>
> $a[0]->{idx}=1;
>
> It could also have been (unlikely)
>
> $a[0]->idx(1);
It *could* also have been
$a[0]->idx = 1;
using something like
{
package My;
my $idx;
sub idx : lvalue method { $idx }
}
my @a = bless [], 'My';
This construction is considered a bad idea nowadays, as it's very hard to
insert a proper 'set' method later.
Ben
------------------------------
Date: Sun, 9 Mar 2008 11:07:09 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: FAQ 5.1 How do I flush/unbuffer an output filehandle? Why must I do this?
Message-Id: <slrnft7dmd.3ul.hjp-usenet2@hrunkner.hjp.at>
On 2008-03-08 04:00, Ben Morrow <ben@morrow.me.uk> wrote:
>
> Quoth PerlFAQ Server <brian@stonehenge.com>:
>>
>> 5.1: How do I flush/unbuffer an output filehandle? Why must I do this?
>>
[...]
>
> Is it worth mentioning
>
> binmode $HANDLE, ':unix';
>
> somewhere here, which will make all prints equivalent to syswrites?
I think so.
hp
------------------------------
Date: Sun, 9 Mar 2008 00:58:02 -0700
From: "Gerry Ford" <invalid@invalid.net>
Subject: finding modules in an activeperl install
Message-Id: <1205048998_58298@news.newsgroups.com>
## minimal nntp client
#!/usr/bin/perl -1
use strict;
use warnings;
use Net::NNTP;
use Date::Parse;
my $nsrv='news.newsgroups.com';
my $grp='comp.lang.perl.misc';
my $USER = '';
my $PASS = '';
my $nntp=Net::NNTP->new($nsrv) or die "Can't login to `$nsrv'$!\n";
$nntp->authinfo($USER,$PASS) or die $!;
my (undef, $first, $last, undef)=$nntp->group($grp)
or die "Can't access $grp\n";
my ($since, @arts)=time-10*60*60;
for (reverse $first..$last) {
my %hdr=map /^(\S[^:]+):\s(.*)$/g, @{$nntp->head($_)};
defined(my $date=$hdr{'NNTP-Posting-Date'}) or next;
defined(my $time=str2time $date)
or warn "Couldn't parse date for article $_ ($date)\n"
and next;
last if $time < $since;
unshift @arts, $_;
}
$nntp->article($_,\*STDOUT) for @arts;
__END__
# perl client2.pl
#end script begin comment by perl.exe
Can't locate Date/Parse.pm in @INC (@INC contains: C:/Perl/site/lib
C:/Perl/lib .) at client2.pl line 9.
BEGIN failed--compilation aborted at client2.pl line 9.
I was hoping to look at the time on the messages in the next several hours
but can't find date/parse on my own machine. How do I tell perl.exe where
to find the date/parse module?
Thanks in advance.
--
Gerry Ford
"Er hat sich georgiert." Der Spiegel, 2008, sich auf Chimpy Eins komma null
beziehend.
------------------------------
Date: Sun, 9 Mar 2008 09:14:38 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: finding modules in an activeperl install
Message-Id: <ucmca5-mb92.ln1@osiris.mauzo.dyndns.org>
Quoth "Gerry Ford" <invalid@invalid.net>:
> ## minimal nntp client
>
>
> #!/usr/bin/perl -1
>
> use strict;
> use warnings;
> use Net::NNTP;
> use Date::Parse;
>
<snip>
>
> # perl client2.pl
> #end script begin comment by perl.exe
>
> Can't locate Date/Parse.pm in @INC (@INC contains: C:/Perl/site/lib
> C:/Perl/lib .) at client2.pl line 9.
> BEGIN failed--compilation aborted at client2.pl line 9.
>
> I was hoping to look at the time on the messages in the next several hours
> but can't find date/parse on my own machine. How do I tell perl.exe where
> to find the date/parse module?
You need to install it with ppm.
Ben
------------------------------
Date: 09 Mar 2008 07:27:17 GMT
From: myicq <myicq2@3gmx.net4>
Subject: list of day/month names in all locales
Message-Id: <Xns9A5C55FF05C05myicqgmxnet@212.242.40.170>
Do anyone have an idea about how to output day / month names
in all known locales (for current system).
This can be in array-form, or a simple list, such as
Locale: Danish (DA_DK)
man, tir, ons...
jan, feb, mar
Locale: Deutsch (DE)
mon, die, mit
Etc
I can't find any information about how to list all available
locales on the system, and query month / day names for that locale.
Basically to iterate over all known locales.
Can anyone help ?
------------------------------
Date: Sun, 9 Mar 2008 09:13:54 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: list of day/month names in all locales
Message-Id: <ibmca5-mb92.ln1@osiris.mauzo.dyndns.org>
Quoth myicq <myicq2@3gmx.net4>:
> Do anyone have an idea about how to output day / month names
> in all known locales (for current system).
>
<snip>
>
> I can't find any information about how to list all available
> locales on the system, and query month / day names for that locale.
> Basically to iterate over all known locales.
Something like
my @locales = qx/locale -a/;
is probably your best bet.
Ben
------------------------------
Date: Sun, 09 Mar 2008 05:11:34 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: Net::SMTP - "Bad File Number" error ?
Message-Id: <ZMqdnUOW49NnTk7anZ2dnUVZ_vTinZ2d@comcast.com>
still just me wrote:
> I'm using Net::SMTP to send mail from a perl program running on a web
> server. Code is as follows:
>
> my $relay="smtp.example.com";
> my $smtp = Net::SMTP->new($relay);
> die "Could not open connection: $!" if (! defined $smtp);
The docs for Net::SMTP does not say that it sets $!, so don't rely on that.
Have you tried turning on debugging?
$smtp = Net::SMTP->new(
Host => 'smtp.example.com',
Hello => 'my.mail.domain'
Timeout => 30,
Debug => 1,
);
------------------------------
Date: Sun, 9 Mar 2008 05:42:18 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sun Mar 9 2008
Message-Id: <JxG7uI.21Ft@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.
Algorithm-Cluster-1.38
http://search.cpan.org/~mdehoon/Algorithm-Cluster-1.38/
Perl interface to the C Clustering Library.
----
Apache-AxKit-Language-XSP-ObjectTaglib-0.09000
http://search.cpan.org/~claco/Apache-AxKit-Language-XSP-ObjectTaglib-0.09000/
Helper for OO Taglibs
----
AxKit-XSP-Currency-0.13000
http://search.cpan.org/~claco/AxKit-XSP-Currency-0.13000/
Currency formatting and conversion taglib
----
AxKit-XSP-L10N-0.05000
http://search.cpan.org/~claco/AxKit-XSP-L10N-0.05000/
String localization (L10N) taglib for AxKit
----
AxKit-XSP-Minisession-1.10000
http://search.cpan.org/~claco/AxKit-XSP-Minisession-1.10000/
Yet Another Session Handling Library
----
CGI-Application-Dispatch-2.13_01
http://search.cpan.org/~wonko/CGI-Application-Dispatch-2.13_01/
Dispatch requests to CGI::Application based objects
----
CPAN-Porters-0.03
http://search.cpan.org/~szabgab/CPAN-Porters-0.03/
resource for people maintaining packages of CPAN modules in various distributions
----
Calendar-Simple-1.18
http://search.cpan.org/~davecross/Calendar-Simple-1.18/
Perl extension to create simple calendars
----
Catalyst-Plugin-RelativePaths-0.01
http://search.cpan.org/~rkitover/Catalyst-Plugin-RelativePaths-0.01/
Make $c->uri_for and $c->req->uri_with return relative URIs
----
Catalyst-View-Download-0.03
http://search.cpan.org/~gaudeon/Catalyst-View-Download-0.03/
----
Data-FeatureFactory-0.04-r2
http://search.cpan.org/~sixtease/Data-FeatureFactory-0.04-r2/
evaluate features normally or numerically
----
Data-Structure-Util-0.13
http://search.cpan.org/~andya/Data-Structure-Util-0.13/
Change nature of data within a structure
----
Data-Throttler-0.02
http://search.cpan.org/~mschilli/Data-Throttler-0.02/
Limit data throughput
----
DateTime-TimeZone-0.73
http://search.cpan.org/~drolsky/DateTime-TimeZone-0.73/
Time zone object base class and factory
----
EV-3.1
http://search.cpan.org/~mlehmann/EV-3.1/
perl interface to libev, a high performance full-featured event loop
----
File-Fu-v0.0.3
http://search.cpan.org/~ewilhelm/File-Fu-v0.0.3/
file and directory objects
----
Flickr-Upload-1.30
http://search.cpan.org/~cpb/Flickr-Upload-1.30/
Upload images to flickr.com
----
FormValidator-Simple-Plugin-Number-Phone-JP-0.03
http://search.cpan.org/~mizzy/FormValidator-Simple-Plugin-Number-Phone-JP-0.03/
Japanese phone number validation
----
Gaim-Log-Parser-0.12
http://search.cpan.org/~mschilli/Gaim-Log-Parser-0.12/
Parse Gaim's Log Files
----
Geo-GoogleEarth-Document-0.10
http://search.cpan.org/~mrdvt/Geo-GoogleEarth-Document-0.10/
Generates GoogleEarth KML Documents
----
HTML-Format-0.2
http://search.cpan.org/~damog/HTML-Format-0.2/
Format Perl data structures into simple HTML
----
HTML-Template-Compiled-0.91_002
http://search.cpan.org/~tinita/HTML-Template-Compiled-0.91_002/
Template System Compiles HTML::Template files to Perl code
----
MP3-CreateInlayCard-0.03
http://search.cpan.org/~bigpresh/MP3-CreateInlayCard-0.03/
create a CD inlay label for a directory of MP3 files
----
Mail-GnuPG-0.15
http://search.cpan.org/~rspier/Mail-GnuPG-0.15/
Process email with GPG.
----
Mail-SpamAssassin-Plugin-OpenPGP-1.0.4
http://search.cpan.org/~brondsem/Mail-SpamAssassin-Plugin-OpenPGP-1.0.4/
A SpamAssassin plugin that validates OpenPGP signed email.
----
Makefile-Parser-0.201
http://search.cpan.org/~agent/Makefile-Parser-0.201/
A simple parser for Makefiles
----
Makefile-Parser-0.202
http://search.cpan.org/~agent/Makefile-Parser-0.202/
A simple parser for Makefiles
----
Makefile-Parser-0.203
http://search.cpan.org/~agent/Makefile-Parser-0.203/
A simple parser for Makefiles
----
Makefile-Parser-0.204
http://search.cpan.org/~agent/Makefile-Parser-0.204/
A simple parser for Makefiles
----
Number-Fraction-1.10
http://search.cpan.org/~davecross/Number-Fraction-1.10/
Perl extension to model fractions
----
PDF-Extract-3.02
http://search.cpan.org/~nsharrock/PDF-Extract-3.02/
Extracting sub PDF documents from a multi page PDF document
----
POE-Component-Client-opentick-0.01
http://search.cpan.org/~infidel/POE-Component-Client-opentick-0.01/
A POE component for working with opentick.com's market data feeds.
----
POE-Component-IRC-Plugin-WWW-XKCD-AsText-0.002
http://search.cpan.org/~zoffix/POE-Component-IRC-Plugin-WWW-XKCD-AsText-0.002/
read http://xkcd.com comics on IRC
----
POE-Component-WWW-Rafb-Create-0.001
http://search.cpan.org/~zoffix/POE-Component-WWW-Rafb-Create-0.001/
non-blocking wrapper around WWW::Rafb::Create
----
Perl-Critic-1.082
http://search.cpan.org/~elliotjs/Perl-Critic-1.082/
Critique Perl source code for best-practices.
----
Perl-Dist-0.90_03
http://search.cpan.org/~adamk/Perl-Dist-0.90_03/
Perl Distribution Creation Toolkit
----
Perl-Repository-APC-2.001
http://search.cpan.org/~andk/Perl-Repository-APC-2.001/
Class modelling "All Perl Changes" repository
----
RDF-Query-2.000_04
http://search.cpan.org/~gwilliams/RDF-Query-2.000_04/
An RDF query implementation of SPARQL/RDQL in Perl for use with RDF::Redland and RDF::Core.
----
SMS-Send-AQL-0.03
http://search.cpan.org/~bigpresh/SMS-Send-AQL-0.03/
SMS::Send driver to send messages via AQL (www.aql.com)
----
SVN-Notify-Config-0.0911
http://search.cpan.org/~jpeacock/SVN-Notify-Config-0.0911/
Config-driven Subversion notification
----
Text-Template-Simple-0.51_1
http://search.cpan.org/~burak/Text-Template-Simple-0.51_1/
Simple text template engine
----
Tie-Hash-Cannabinol-1.10
http://search.cpan.org/~davecross/Tie-Hash-Cannabinol-1.10/
Perl extension for creating hashes that forget things
----
Tie-Hash-Regex-1.01
http://search.cpan.org/~davecross/Tie-Hash-Regex-1.01/
Match hash keys using Regular Expressions
----
WWW-OhNoRobotCom-Search-0.001
http://search.cpan.org/~zoffix/WWW-OhNoRobotCom-Search-0.001/
search comic transcriptions on http://ohnorobot.com
----
WWW-PastebinCa-Retrieve-0.002
http://search.cpan.org/~zoffix/WWW-PastebinCa-Retrieve-0.002/
retrieve pastes from http://pastebin.ca
----
WWW-Rafb-Create-0.001
http://search.cpan.org/~zoffix/WWW-Rafb-Create-0.001/
create new pastes on http://rafb.net
----
WWW-Rafb-Retrieve-0.001
http://search.cpan.org/~zoffix/WWW-Rafb-Retrieve-0.001/
retrieve pastes from http://rafb.net/paste/
----
classes-0.944
http://search.cpan.org/~rmuhle/classes-0.944/
conventional Perl 5 classes
----
kephra-0.3.6_11
http://search.cpan.org/~lichtkind/kephra-0.3.6_11/
----
kephra-0.3.6_12
http://search.cpan.org/~lichtkind/kephra-0.3.6_12/
crossplatform, CPAN-installable GUI-Texteditor along Perl's Paradigms
----
pQuery-0.02
http://search.cpan.org/~ingy/pQuery-0.02/
Perl Port of jQuery.js
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: Sun, 09 Mar 2008 05:07:20 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: OK I want read: IP Address properties of user's Internet Connection
Message-Id: <ZMqdnUCW49NhT07anZ2dnUVZ_vTinZ2d@comcast.com>
Marthan wrote:
> OK I want read: IP Address properties of user's Internet Connection
What kind of internet connection?
There are different answers, depending on how the connection comes
in to your server. HTTP, FTP, TELNET, SSH, BitTorrent, Skype, etc, etc, etc.
-Joe
------------------------------
Date: Sun, 09 Mar 2008 13:04:01 +0100
From: Daniel Cutter <danREMOVETHESECAPSiel@agac.REMOVETHISTOO.DOMAIN_IS_DE>
Subject: printf doesn't do right justify
Message-Id: <fr0jng$r08$1@online.de>
I thought that printf would allways right justify numbers, unless told
to do differently (with '-'). perlfunc doesn't tell.
#!perl
use strict;
use warnings;
printf("%2.1f\n", 12.3);
printf("%2.1f\n", 4.5);
printf("%02.1f\n", 6.7);
The results are:
12.3
4.5
6.7
But I expected:
12.3
4.5
06.7
What am I missing?
perl -v says:
This is perl, v5.10.0 built for MSWin32-x86-multi-thread
It's Win XP with all the patches
Regards
Daniel Cutter
------------------------------
Date: Sun, 9 Mar 2008 12:32:51 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: printf doesn't do right justify
Message-Id: <j02da5-a62.ln1@osiris.mauzo.dyndns.org>
Quoth Daniel Cutter <danREMOVETHESECAPSiel@agac.REMOVETHISTOO.DOMAIN_IS_DE>:
> I thought that printf would allways right justify numbers, unless told
> to do differently (with '-'). perlfunc doesn't tell.
>
> #!perl
> use strict;
> use warnings;
> printf("%2.1f\n", 12.3);
> printf("%2.1f\n", 4.5);
> printf("%02.1f\n", 6.7);
The number before the . is the minimum total field width, not the number
of places before the decimal (yes, I think this is confusing too, but
it's more consistent with %3.5s). So you want
printf("%4.1f\n", 12.3);
printf("%4.1f\n", 4.5);
printf("%04.1f\n", 6.7);
Ben
------------------------------
Date: Sun, 9 Mar 2008 01:24:32 -0800 (PST)
From: Ilias Lazaridis <ilias@lazaridis.com>
Subject: Trac - Does it make sense to keep http://trac.edgewall.org/ticket/4315 open?
Message-Id: <deda9dda-a319-47b3-ad69-dc6acac2984d@e31g2000hse.googlegroups.com>
Response to message [1] on trac.devel (as I cannot write there, due to
an informally applied censorship)
Mr. Boos: "I left that ticket open simply to avoid having someone to
reopen it over
and over..."
(note to reader: this someone is me)
Mr. Boos, the ticket status should reflect reality. So, if reality
says "the ticket is open", no one can (should" close it.
The essens of the ticket is, that you should trust you own results.
You should use your development version, in order to obtain feedback.
Of course I understand (seeing the terrible processes of the team),
that you distrust your own results, prefering to let user do the dirty
work of development-version-usage.
Your inability to follow even the most rational suggestions subjecting
development-processes, e.g. this one:
http://trac.edgewall.org/ticket/6614#comment:36
will lead (together with the terrible quality of the trac source-code
base) soon to an even more stucked development progress. Be assured
that users see this (although they don't say much, like me).
Do you actually realize that you're working since over a year on
0.11?
Nothing is more fun that to watch the trac project running into one
after another problem during development. At least you give other
teams a good example of "how to ruine a good open-source product".
http://case.lazaridis.com/wiki/TracAudit
-
To readers:
The project hunts since months a memory-leak - without success.
I'm wondering that python makes so much trouble in finding it. Seems
to be another very fundamental reason to leave this "joke of a
language" (python).
-
[1]
http://groups.google.com/group/trac-dev/msg/1cbcaf2b5fdc8abe
From: Christian Boos <cb...@neuf.fr>
Jeroen Ruigrok van der Werven wrote:
> Does it make sense to keep http://trac.edgewall.org/ticket/4315 open?
I left that ticket open simply to avoid having someone to reopen it
over
and over... That ticket is a bit useless in that it has anyway always
been the policy of the project to run the latest stable release. And
that works quite well in practice. I imagine t.e.o would already be
running 0.11b1 now, if we didn't have those memory issues. As for
documenting the blocker issues, doing that directly on the milestone
page is more effective anyway. So I'd say let's just not make a fuss
about this one and we'll close it once t.e.o gets upgraded to 0.11.
-- Christian
------------------------------
Date: Sat, 8 Mar 2008 22:28:23 -0800 (PST)
From: axtens <Bruce.Axtens@gmail.com>
Subject: Re: Two perl-specific postings on Codeaholic
Message-Id: <979a2b45-a5eb-4160-84d5-6ed0c8991432@d4g2000prg.googlegroups.com>
On Mar 4, 11:44 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
> On Tue, 04 Mar 2008 06:40:27 GMT, "John W. Krahn"
>
> <some...@example.com> wrote:
> >Ouch! Use a dispatch table instead of string eval().
>
> >my %rule = (
> > 1 => sub {
> > ( my $arg = shift ) =~ tr/s//d;
> > return $arg;
> > },
> > 2 => sub {
> > return join '', sort split //, shift;
> > },
>
> Since the keys are numbers, an array may be appropriate.
>
> Michele
> --
> {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
> (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
> .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
> 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
Wow, this is great stuff. Thanks, both of you! Shall cook up another
posting during the week and put your names in lights (unless you'd
prefer otherwise, in which case email me off-list).
Kind regards,
Bruce.
------------------------------
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 1345
***************************************