[31192] in Perl-Users-Digest
Perl-Users Digest, Issue: 2437 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 23 11:09:39 2009
Date: Sat, 23 May 2009 08: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 Sat, 23 May 2009 Volume: 11 Number: 2437
Today's topics:
Re: ampersand subroutine <tadmc@seesig.invalid>
Re: ampersand subroutine <hjp-usenet2@hjp.at>
Re: ampersand subroutine (Randal L. Schwartz)
Re: ampersand subroutine <whynot@pozharski.name>
Re: ampersand subroutine <whynot@pozharski.name>
Re: ampersand subroutine <1usa@llenroc.ude.invalid>
Re: Archive::Zip and correct extension (mixture of Word <gcox@freeuk.com>
Re: Archive::Zip and correct extension (mixture of Word <gcox@freeuk.com>
Re: Archive::Zip and correct extension (mixture of Word <hjp-usenet2@hjp.at>
Re: change file names using Archive::Zip <gcox@freeuk.com>
Re: comma operator <frank@example.invalid>
Re: edit array in place <rvtol+usenet@xs4all.nl>
Re: edit array in place <whynot@pozharski.name>
Re: Is PERL good for a linguist new to programming? <christian.ramseyer@gmail.com>
new CPAN modules on Sat May 23 2009 (Randal Schwartz)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 22 May 2009 20:14:10 -0500
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: ampersand subroutine
Message-Id: <slrnh1ejf2.2n8.tadmc@tadmc30.sbcglobal.net>
Nathan Keel <nat.k@gm.ml> wrote:
> Tad J McClellan wrote:
>
>> Uri Guttman <uri@StemSystems.com> wrote:
>>>>>>>> "NK" == Nathan Keel <nat.k@gm.ml> writes:
>>
>>> NK> Yes, I'm aware you think everyone else but YOU have the attitude
>>> NK> problem.
>>
>>
>> Huh, that's funny.
>>
>> I'd thought the same of you (Nathan).
>
> Nothing funny about it.
http://dictionary.reference.com/browse/funny
5. curious; strange; peculiar; odd:
>>> NK> I also realize that you're such a fucking prick
>>
>>> ooohh! cursing now. the last refuge of the incompetent.
>>
>>
>> Indeed.
>
> Indeed you'll agree with "uri", since he's a long time member here,
I sometimes do that.
But not this time.
This time I was agreeing with Uri since cursing *is* the last
refuge of the incompetent.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Sat, 23 May 2009 09:23:25 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: ampersand subroutine
Message-Id: <slrnh1f93d.aiv.hjp-usenet2@hrunkner.hjp.at>
On 2009-05-22 20:19, Uri Guttman <uri@StemSystems.com> wrote:
> check out this for some horrible coding style. of course you will
> probably like it:
>
> http://search.cpan.org/~domizio/
WTF? That's just ... words fail me.
hp
------------------------------
Date: Sat, 23 May 2009 00:51:05 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: ampersand subroutine
Message-Id: <86my94mf4m.fsf@blue.stonehenge.com>
>>>>> "Peter" == Peter J Holzer <hjp-usenet2@hjp.at> writes:
Peter> On 2009-05-22 20:19, Uri Guttman <uri@StemSystems.com> wrote:
>> check out this for some horrible coding style. of course you will
>> probably like it:
>>
>> http://search.cpan.org/~domizio/
Peter> WTF? That's just ... words fail me.
Indeed. We now use all of that stuff as "what not to do for the CPAN".
--
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: Sat, 23 May 2009 06:03:59 +0300
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: ampersand subroutine
Message-Id: <slrnh1ept4.mtg.whynot@orphan.zombinet>
On 2009-05-22, A. Sinan Unur <1usa@llenroc.ude.invalid> wrote:
> "Uri Guttman" <uri@StemSystems.com> wrote in
> news:87k548914h.fsf@quad.sysarch.com:
>
>>
>> >> uri
>>
>> NK> nal cake.
>>
>> wow!
>
> ...
>
>> and one more thing: exit( 'keel' ) ;
That barfs
{73521:128} [0:0]$ perl -Mstrict -wle 'exit "keel"'
Argument "keel" isn't numeric in exit at -e line 1.
> exit [ keel => pos ];
And why shell's I<$?> is 16 then?
{73537:129} [0:0]$ perl -Mstrict -wle 'exit [ keel => pos ]'
{73564:130} [0:16]$
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
------------------------------
Date: Sat, 23 May 2009 06:13:56 +0300
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: ampersand subroutine
Message-Id: <slrnh1eqfq.mtg.whynot@orphan.zombinet>
On 2009-05-22, Uri Guttman <uri@StemSystems.com> wrote:
>>>>>> "NK" == Nathan Keel <nat.k@gm.ml> writes:
*SKIP*
> NK> A true dick thing to say. My skills have nothing to do with
> NK> disagreeing with you (oh God, AGAIN). Grow up.
>
> EWWW!! i will switch to python now just because of that.
No, please don't. You'll flame them away, and they'll flood c.l.p.m.
(as a revenge).
*CUT*
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
------------------------------
Date: Sat, 23 May 2009 12:53:21 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: ampersand subroutine
Message-Id: <Xns9C145A79555BCasu1cornelledu@127.0.0.1>
Eric Pozharski <whynot@pozharski.name> wrote in
news:slrnh1ept4.mtg.whynot@orphan.zombinet:
> On 2009-05-22, A. Sinan Unur <1usa@llenroc.ude.invalid> wrote:
>> "Uri Guttman" <uri@StemSystems.com> wrote in
>> news:87k548914h.fsf@quad.sysarch.com:
>>
>>>
>>> >> uri
>>>
>>> NK> nal cake.
>>>
>>> wow!
>>
>> ...
>>
>>> and one more thing: exit( 'keel' ) ;
>
> That barfs
>
> {73521:128} [0:0]$ perl -Mstrict -wle 'exit "keel"'
> Argument "keel" isn't numeric in exit at -e line 1.
>
>
>> exit [ keel => pos ];
>
> And why shell's I<$?> is 16 then?
>
> {73537:129} [0:0]$ perl -Mstrict -wle 'exit [ keel => pos ]'
> {73564:130} [0:16]$
The return value is unlikely to be consistent across executions and
environments because it will be the least significant byte of the
anonymous array ref constructed above:
$ perl -Mstrict -wle 'print [ keel => pos ]'
ARRAY(0x10023d48)
$ perl -Mstrict -wle 'exit [ keel => pos ]'
$ printf '%x\n' $?
48
I think this is more expressive:
$ perl -Mstrict -wle 'no attributes -to_like => exit [ keel => pos ]'
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Sat, 23 May 2009 08:21:36 +0100
From: Geoff Cox <gcox@freeuk.com>
Subject: Re: Archive::Zip and correct extension (mixture of Word and PowerPoint files)?
Message-Id: <hu8f1591ntca5d8gqmu11qf5ht9fbnv8n4@4ax.com>
On Sat, 23 May 2009 00:17:43 +0200, Bart Lateur
<bart.lateur@pandora.be> wrote:
>Peter J. Holzer wrote:
>
>>Please read the whole thread before starting
>>a discussion about a problem which is already solved.
>
>It's solved the wrong way: butt first.
Bart,
I prabably have not understood what you have said - could you please
have another go?
Thanks
Geoff
------------------------------
Date: Sat, 23 May 2009 08:28:03 +0100
From: Geoff Cox <gcox@freeuk.com>
Subject: Re: Archive::Zip and correct extension (mixture of Word and PowerPoint files)?
Message-Id: <v29f15194udlb2nc78r1p4s1bvu2e33ogu@4ax.com>
On Sat, 23 May 2009 00:17:43 +0200, Bart Lateur
<bart.lateur@pandora.be> wrote:
>Peter J. Holzer wrote:
>
>>Please read the whole thread before starting
>>a discussion about a problem which is already solved.
>
>It's solved the wrong way: butt first.
Bart,
In asking you to have another try I should have just made clear what I
need.
Say I have lots of files in sub-folders with names such as
file-22.zip
and in each zip file there is just 1 file, with extension .doc, or
.ppt or .xls.
and I need to get the .doc, or .ppt or .xls file and give it the same
name as the zip file but with the correct extension,so
if file-22.zip contains an xls file the new name is
file-22.xls
'hope that's clear!
Cheers
Geoff
------------------------------
Date: Sat, 23 May 2009 09:17:13 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Archive::Zip and correct extension (mixture of Word and PowerPoint files)?
Message-Id: <slrnh1f8np.aiv.hjp-usenet2@hrunkner.hjp.at>
On 2009-05-22 22:17, Bart Lateur <bart.lateur@pandora.be> wrote:
> Peter J. Holzer wrote:
>>Please read the whole thread before starting
>>a discussion about a problem which is already solved.
>
> It's solved the wrong way: butt first.
>
Ok, so given these facts:
* You have lots of zip files.
* The basenames of the zip files are meaningful.
* Each zip file contains one MS-Office file (word, excel, power-point, ...)
* The basenames of these files are not meaningful
* The extensions of these files are correct (i.e. all word documents
end with .doc, all excel files with .xls, etc.)
You want to extract all the files from the zip files but with meaningful
names. So, if you have a zip file named "budget-2008.zip" which contains
an excel file named "434367.xls" you want to extract it as
"budget-2008.xls".
The proposed way to do this is to combine the basename of the zip file
with the extension of the zipped file.
Why is this butt first, and what alternative do you propose?
hp
------------------------------
Date: Sat, 23 May 2009 10:54:11 +0100
From: Geoff Cox <gcox@freeuk.com>
Subject: Re: change file names using Archive::Zip
Message-Id: <hqhf15trskii72plgtabcft57jkifse3o0@4ax.com>
On Mon, 18 May 2009 00:36:11 -0700, Franken Sense
<frank@example.invalid> wrote:
>What's your OS and/or target OS?
Frank,
I am using Windows XP Pro - you might like to look at the later
postings entitled
Archive::Zip and correct extension (mixture of Word and PowerPoint
files)?
Cheers,
Geoff
------------------------------
Date: Fri, 22 May 2009 21:51:39 -0700
From: Franken Sense <frank@example.invalid>
Subject: Re: comma operator
Message-Id: <7ggsjx2e3otq$.1fa72srqm7q65$.dlg@40tude.net>
In Dread Ink, the Grave Hand of Charlton Wilbur Did Inscribe:
>>>>>> "FS" == Franken Sense <frank@example.invalid> writes:
>
> FS> In Dread Ink, the Grave Hand of Charlton Wilbur Did Inscribe:
>
> >> Consider choosing a different font for your terminal window or
> >> your IDE. The difference between ( and { is fairly significant.
>
> FS> My sysadmin buddy thought I should continue with perl using
> FS> Eclipse.
>
> Yes, and? Has Eclipse suddenly been altered so that you cannot change
> the font? Or do you not recognize "IDE" as a general term for the class
> of things of which Eclipse is a member?
>
> Charlton
I couldn't say. This chapter of my programming is, to be frank,
embarrassing. I had all the language and implementation issues at the same
time that my eyesight failed somewhat.
Now, I buy eyeglasses for a dollar.
Activestate is what has been my workhorse. I'm oblidged to see what
Eclipse can do.
My dos window is not where I see ( as opposed to {.
--
Frank
Whining is anger through a small opening.
~~ Al Franken
------------------------------
Date: Sat, 23 May 2009 11:07:36 +0200
From: "Dr.Ruud" <rvtol+usenet@xs4all.nl>
Subject: Re: edit array in place
Message-Id: <4a17bcd8$0$187$e4fe514c@news.xs4all.nl>
Brandon Metcalf wrote:
> It seems there should be a better way of accomplishing what the
> following does, but I'm not coming up with anything.
>
> @f = map($_ =~ s/"0000-00-00"/NULL/ ? $_ : $_, @f);
Is that "0000-00-00" the whole value?
$_ eq q{"0000-00-00"} and $_ = q{NULL} for @f;
--
Ruud
------------------------------
Date: Sat, 23 May 2009 06:09:30 +0300
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: edit array in place
Message-Id: <slrnh1eq7f.mtg.whynot@orphan.zombinet>
On 2009-05-22, Uri Guttman <uri@StemSystems.com> wrote:
*SKIP*
> hell, file::slurp is backwards compatible to 5.005 still and i aim to
> keep it that way.
Is it a kind of sport?
*CUT*
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
------------------------------
Date: Sat, 23 May 2009 07:27:17 -0700 (PDT)
From: rc <christian.ramseyer@gmail.com>
Subject: Re: Is PERL good for a linguist new to programming?
Message-Id: <93b4e1fa-d899-44cd-ba1b-ebeaddedec29@u8g2000yqn.googlegroups.com>
On May 21, 5:58=A0pm, p.podmos...@googlemail.com wrote:
> I don't want Perl to write the dissertation FOR ME. I just want Perl
> to be the tool to assist me in creating something which will be the
> subject of that dissertation.
Good that you don't want it to write your papers, but on a little side
note, Perl is maybe the only language that ever managed to
automatically write papers that were accepted to conferences and
journals:
http://pdos.csail.mit.edu/scigen/
Never underestimate Perl :)
--
rc at networkz dot ch
------------------------------
Date: Sat, 23 May 2009 04:42:28 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat May 23 2009
Message-Id: <KK2yEs.148w@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.
Acme-PM-Paris-Meetings-200905.04
http://search.cpan.org/~dolmen/Acme-PM-Paris-Meetings-200905.04/
Get the date/time of the next Paris.pm meeting!
----
AnyEvent-CouchDB-1.12
http://search.cpan.org/~beppu/AnyEvent-CouchDB-1.12/
a non-blocking CouchDB client based on jquery.couch.js
----
App-Framework-0.93
http://search.cpan.org/~sdprice/App-Framework-0.93/
A framework for creating applications
----
CPAN-Testers-ParseReport-0.1.2
http://search.cpan.org/~andk/CPAN-Testers-ParseReport-0.1.2/
parse reports to www.cpantesters.org from various sources
----
CPANPLUS-Dist-Mdv-1.1.0
http://search.cpan.org/~jquelin/CPANPLUS-Dist-Mdv-1.1.0/
a cpanplus backend to build mandriva rpms
----
Catalyst-Plugin-PluginLoader-0.03
http://search.cpan.org/~rkitover/Catalyst-Plugin-PluginLoader-0.03/
Load Catalyst Plugins from Config
----
DBD-Wire10-1.00
http://search.cpan.org/~dubex/DBD-Wire10-1.00/
Pure Perl MySQL, Sphinx, and Drizzle driver for DBI.
----
DBIx-Class-InflateColumn-FS-0.01004
http://search.cpan.org/~mmims/DBIx-Class-InflateColumn-FS-0.01004/
store BLOBs in the file system
----
Debug-STDERR-0.00003
http://search.cpan.org/~miki/Debug-STDERR-0.00003/
provide debug() method and redirect STDERR.
----
Devel-STDERR-Indent-0.05
http://search.cpan.org/~nuffin/Devel-STDERR-Indent-0.05/
Indents STDERR to aid in print-debugging recursive algorithms.
----
Dist-Zilla-1.091430
http://search.cpan.org/~rjbs/Dist-Zilla-1.091430/
distribution builder; installer not included!
----
Env-Sanctify-Moosified-1.04
http://search.cpan.org/~bingos/Env-Sanctify-Moosified-1.04/
Lexically scoped sanctification of %ENV
----
Filter-Arguments-0.07
http://search.cpan.org/~dylan/Filter-Arguments-0.07/
Configure and read your command line arguments from @ARGV.
----
Gearman-XS-0.01
http://search.cpan.org/~dschoen/Gearman-XS-0.01/
Perl front end for the Gearman C library.
----
Geo-Coordinates-UTM-XS-0.04
http://search.cpan.org/~salva/Geo-Coordinates-UTM-XS-0.04/
C/XS reimplementation of Geo::Coordinates::UTM
----
HTML-FormHandler-0.23
http://search.cpan.org/~gshank/HTML-FormHandler-0.23/
form handler written in Moose
----
KSx-Highlight-Summarizer-0.06
http://search.cpan.org/~sprout/KSx-Highlight-Summarizer-0.06/
KinoSearch Highlighter subclass that provides more comprehensive summaries
----
Locale-Maketext-Utils-0.14
http://search.cpan.org/~dmuey/Locale-Maketext-Utils-0.14/
Adds some utility functionality and failure handling to Local::Maketext handles
----
Log-Handler-0.51_01
http://search.cpan.org/~bloonix/Log-Handler-0.51_01/
Log messages to several outputs.
----
Mail-DKIM-0.35
http://search.cpan.org/~jaslong/Mail-DKIM-0.35/
Signs/verifies Internet mail with DKIM/DomainKey signatures
----
Mail-IMAP2SMS-1.10
http://search.cpan.org/~rcrowder/Mail-IMAP2SMS-1.10/
Perl extension for IMAP to SMS.
----
Module-Install-0.90
http://search.cpan.org/~adamk/Module-Install-0.90/
Standalone, extensible Perl module installer
----
Net-SFTP-Foreign-1.52_08
http://search.cpan.org/~salva/Net-SFTP-Foreign-1.52_08/
SSH File Transfer Protocol client
----
Net-Twitter-2.99000_01
http://search.cpan.org/~mmims/Net-Twitter-2.99000_01/
A interface to the Twitter API
----
Net-Wire10-1.00
http://search.cpan.org/~dubex/Net-Wire10-1.00/
Pure Perl driver for MySQL, Sphinx and Drizzle.
----
POEx-Types-0.091420
http://search.cpan.org/~nperez/POEx-Types-0.091420/
Exported Types for use within POEx modules
----
RAR-Unrar-1.00
http://search.cpan.org/~nikosv/RAR-Unrar-1.00/
is a procedural module that provides manipulation (extraction and listing of embedded information) of compressed RAR format archives by interfacing with the unrar.dll dynamic library for Windows.
----
Software-License-0.012
http://search.cpan.org/~rjbs/Software-License-0.012/
packages that provide templated software licenses
----
Sub-Pipe-0.01
http://search.cpan.org/~fujiwara/Sub-Pipe-0.01/
chain subs with | (pipe)
----
Sub-Pipe-0.02
http://search.cpan.org/~fujiwara/Sub-Pipe-0.02/
chain subs with | (pipe)
----
TRD-WebRelayMail-0.0.3
http://search.cpan.org/~ichi/TRD-WebRelayMail-0.0.3/
[One line description of module's purpose here]
----
Term-ANSIColorx-ColorNicknames-2.7183
http://search.cpan.org/~jettero/Term-ANSIColorx-ColorNicknames-2.7183/
nicknames for the ANSI colors
----
Test-LatestPrereqs-0.01
http://search.cpan.org/~ishigaki/Test-LatestPrereqs-0.01/
test if the required module versions are big enough
----
UR-Bundle-0.01
http://search.cpan.org/~sakoht/UR-Bundle-0.01/
----
URI-Amazon-APA-0.02
http://search.cpan.org/~dankogai/URI-Amazon-APA-0.02/
URI to access Amazon Product Advertising API
----
WWW-Contact-0.26
http://search.cpan.org/~fayland/WWW-Contact-0.26/
Get contacts/addressbook from Web
----
WWW-Veoh-Download-0.01
http://search.cpan.org/~yusukebe/WWW-Veoh-Download-0.01/
Download mp4 files from Veoh
----
autodie-1.999_01
http://search.cpan.org/~pjf/autodie-1.999_01/
Replace functions with ones that succeed or die with lexical scope
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: 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 2437
***************************************