[29078] in Perl-Users-Digest
Perl-Users Digest, Issue: 322 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 11 09:09:51 2007
Date: Wed, 11 Apr 2007 06: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, 11 Apr 2007 Volume: 11 Number: 322
Today's topics:
[ANNOUNCE]: Hackathon Toronto, Saturday, April 28 <jkeen@verizon.net>
Re: Absolute Path errors <bik.mido@tiscalinet.it>
new CPAN modules on Wed Apr 11 2007 (Randal Schwartz)
Re: Print Subject without characters Just Numbers using <sisyphus1@nomail.afraid.org>
Re: Print Subject without characters Just Numbers using <sisyphus1@nomail.afraid.org>
telnet ->A -> B -> A <ton_de_winter@yahoo.co.uk>
Re: Traversing a hash with array refs as keys? anno4000@radom.zrz.tu-berlin.de
Re: Using Modules once <mritty@gmail.com>
Re: Using Modules once <googleAcct@screenlight.com>
Which module can deal with sound and transform it on th <jdxyw2004@gmail.com>
Re: Why No Famous Open Source Projects From Britain/Ire <check.sig@for.email.invalid>
Win32::API cannot load any DLL? <u8526505@gmail.com>
Re: Win32::API cannot load any DLL? <sisyphus1@nomail.afraid.org>
Re: Win32::API cannot load any DLL? <u8526505@gmail.com>
Re: Win32::API cannot load any DLL? <bart.lateur@pandora.be>
Re: Win32::API cannot load any DLL? <sisyphus1@nomail.afraid.org>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 11 Apr 2007 10:27:10 GMT
From: James E Keenan <jkeen@verizon.net>
Subject: [ANNOUNCE]: Hackathon Toronto, Saturday, April 28
Message-Id: <2K2Th.9901$OU1.7984@trndny04>
Toronto Perlmongers are pleased to announce Hackathon Toronto, a
one-day, almost-spur-of-the-moment hackathon, to be held Saturday, April
28, 2007.
A hackathon is a gathering of free and open source software developers
reflecting the joy of collective hacking. Building on the tradition of
previous Perl hackathons in Toronto, Chicago and elsewhere, Hackathon
Toronto will encourage people to come together for face-to-face work on
Perl 5, Perl 6, CPAN modules, Parrot, Pugs and ... you name it!
A hackathon wiki has been established at
http://rakudo.org/hackathon-toronto/. Go there to learn details as to
participation, location, transportation, projects, logistics, etc. As
we get closer to the hackathon date, log on to #hackathon on irc.perl.org.
If you can be in Toronto on Saturday, April 28, we hope to see you
there. Thank you very much.
Jim Keenan
------------------------------
Date: Wed, 11 Apr 2007 12:30:31 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Absolute Path errors
Message-Id: <m2ep13tfj42b0in124u5l2ni32mo7aehto@4ax.com>
On 10 Apr 2007 14:27:29 -0700, "?????" <hackeras@gmail.com> wrote:
>> >i only deleted the idnex.html file pointing to index.pl, that all and
>> >i set DirectoryIndex index.html cgi-bin/index.pl
>>
>> What effect does the latter operation create?
>
>When a user asks for a webserver directory apache sees iftf there is
>an index.html file there first, if its not it serves cgi-bin/index.pl
>if it cant find it then it gives a dirr index.
Well, and when cgi-bin/index.pl is executed, what do you think that
its cwd will be?
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,
------------------------------
Date: Wed, 11 Apr 2007 04:42:10 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Apr 11 2007
Message-Id: <JGBH2A.p73@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-Partition-0.02
http://search.cpan.org/~dmitri/Algorithm-Partition-0.02/
Partition a set of integers.
----
Authen-Krb5Password-1.03
http://search.cpan.org/~shuque/Authen-Krb5Password-1.03/
Perl extension for Kerberos 5 password verification
----
CGI-Uploader-2.13
http://search.cpan.org/~markstos/CGI-Uploader-2.13/
Manage CGI uploads using SQL database
----
Continuity-0.10
http://search.cpan.org/~awwaiid/Continuity-0.10/
Abstract away statelessness of HTTP using continuations, for stateful Web applications
----
Continuity-0.91
http://search.cpan.org/~awwaiid/Continuity-0.91/
Abstract away statelessness of HTTP using continuations, for stateful Web applications
----
Data-Message-1.011
http://search.cpan.org/~rjbs/Data-Message-1.011/
Parse and Reconstruct RFC2822 Compliant Messages
----
Data-PowerSet-0.04
http://search.cpan.org/~dland/Data-PowerSet-0.04/
Generate all subsets of a list of elements
----
DateTime-Format-ISO8601-0.06
http://search.cpan.org/~jhoblitt/DateTime-Format-ISO8601-0.06/
Parses ISO8601 formats
----
DateTime-Format-Natural-0.27
http://search.cpan.org/~schubiger/DateTime-Format-Natural-0.27/
Create machine readable date/time with natural parsing logic
----
File-Tail-App-v0.0.3
http://search.cpan.org/~dmuey/File-Tail-App-v0.0.3/
Perl extension for making apps that tail files
----
Form-Processor-0.06
http://search.cpan.org/~hank/Form-Processor-0.06/
validate and process form data
----
JSON-DWIW-0.06
http://search.cpan.org/~dowens/JSON-DWIW-0.06/
JSON converter that Does What I Want
----
MailTools-1.76
http://search.cpan.org/~markov/MailTools-1.76/
----
Math-3D-0.1
http://search.cpan.org/~hooo/Math-3D-0.1/
----
Params-Validate-Micro-0.030
http://search.cpan.org/~hdp/Params-Validate-Micro-0.030/
Validate parameters concisely
----
Reaper-1.00
http://search.cpan.org/~jgs/Reaper-1.00/
support for reaping child processes via $SIG{CHLD}
----
Search-Odeum-0.02
http://search.cpan.org/~ikebe/Search-Odeum-0.02/
Perl interface to the Odeum inverted index API.
----
Set-IntSpan-Island-0.03
http://search.cpan.org/~martink/Set-IntSpan-Island-0.03/
extension for Set::IntSpan to handle islands and covers
----
Term-Menu-0.08
http://search.cpan.org/~dazjorz/Term-Menu-0.08/
Perl extension for asking questions and printing menus at the terminal
----
Test-Command-0.02
http://search.cpan.org/~danboo/Test-Command-0.02/
Test routines for external commands
----
Tk-FontDialog-0.13
http://search.cpan.org/~srezic/Tk-FontDialog-0.13/
a font dialog widget for perl/Tk
----
Tk-GraphViz-0.90
http://search.cpan.org/~jgs/Tk-GraphViz-0.90/
Render an interactive GraphViz graph
----
Tk-TreeGraph-1.030
http://search.cpan.org/~ddumont/Tk-TreeGraph-1.030/
Tk widget to draw a tree in a Canvas
----
WWW-Monitor-0.2
http://search.cpan.org/~yaron/WWW-Monitor-0.2/
Monitor websites for updates and changes
----
Web-Scaffold-0.11
http://search.cpan.org/~miker/Web-Scaffold-0.11/
build minimalist fancy web sites
----
XML-FeedPP-Plugin-AddMP3-0.02
http://search.cpan.org/~tsukamoto/XML-FeedPP-Plugin-AddMP3-0.02/
FeedPP Plugin for adding MP3 as item.
----
forks-BerkeleyDB-0.05
http://search.cpan.org/~rybskej/forks-BerkeleyDB-0.05/
high-performance drop-in replacement for threads
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: Wed, 11 Apr 2007 13:48:12 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Print Subject without characters Just Numbers using POP3Client. Please Help
Message-Id: <461c5a73$0$28625$afc38c87@news.optusnet.com.au>
<eng.john84@gmail.com> wrote in message
news:1176262038.155405.71070@y80g2000hsf.googlegroups.com...
> I`m using POP3Client,
> I don`t need to print all subject i need to print just number.
> i.e --> if Subject: John 1234567890, Then i need to print 1234567890
>
I don't understand - there is usually *no* number associated with the
Subject. At least that's the way it is for me when I run the script you
provided. Typical output is:
----------
From: =?ISO-8859-1?Q?D=E9cio_Luiz_Gazzoni_Filho?= <decio@dec.net>
Subject: Decimal arithmetic
----------
The only time I see numbers is when the person writing the email has
included numeric character(s) in the subject. eg:
----------
From: "mingw-gh3d-mailinglist@limco.pl" <mingw-gh3d-mailinglist@limco.pl>
Subject: [Mingw-users] mingw with g++ 4.x
----------
Cheers,
Rob
------------------------------
Date: Wed, 11 Apr 2007 13:51:44 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Print Subject without characters Just Numbers using POP3Client. Please Help
Message-Id: <461c5b44$0$16555$afc38c87@news.optusnet.com.au>
<eng.john84@gmail.com> wrote in message
news:1176262038.155405.71070@y80g2000hsf.googlegroups.com...
> I`m using POP3Client,
> I don`t need to print all subject i need to print just number.
> i.e --> if Subject: John 1234567890, Then i need to print 1234567890
>
I don't understand - there is usually *no* number associated with the
Subject. At least that's the way it is for me when I run the script you
provided. Typical output is:
----------
From: =?ISO-8859-1?Q?D=E9cio_Luiz_Gazzoni_Filho?= <decio@dec.net>
Subject: Decimal arithmetic
----------
The only time I see numbers is when the person writing the email has
included numeric character(s) in the subject. eg:
----------
From: "mingw-gh3d-mailinglist@limco.pl" <mingw-gh3d-mailinglist@limco.pl>
Subject: [Mingw-users] mingw with g++ 4.x
----------
Cheers,
Rob
------------------------------
Date: 11 Apr 2007 06:00:31 -0700
From: "ton de w" <ton_de_winter@yahoo.co.uk>
Subject: telnet ->A -> B -> A
Message-Id: <1176296431.606412.105070@p77g2000hsh.googlegroups.com>
Hello,
Have to write some perl code to telnet from a sun box to another sun
box, say node A, and then telnet from this box to another box say B,
and then finally telnet from B back to A.
Wont know the nodes in advance, get them from a list (of 2 nodes)
given to me in real time.
So there must be an easy, hard or very hard way of doing this!
I am not sure whether to use perl's expect or Net::Telnet or possibly
something else.
Could someone help me choose? And any other hints welcome..
TIA
Ton
------------------------------
Date: 11 Apr 2007 11:55:15 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Traversing a hash with array refs as keys?
Message-Id: <5840l3F2ek3rcU1@mid.dfncis.de>
Mumia W. <paduille.4061.mumia.w+nospam@earthlink.net> wrote in comp.lang.perl.misc:
> On 04/06/2007 12:32 PM, Bryan wrote:
> > Another one...
> >
> > I have a structure of key value pairs, where the key is an array, and
> > the value is a scalar. [...]
>
> As the others have said, hash keys must always be scalar strings;
> however, I think there's a module on CPAN that allows you to use
> references as hash keys. It might be Tie::RefHash, but search CPAN
> yourself: http://search.cpan.org/
Tie::RefHash is a standard module.
Anno
------------------------------
Date: 10 Apr 2007 18:04:37 -0700
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Using Modules once
Message-Id: <1176253477.941039.318620@p77g2000hsh.googlegroups.com>
On Apr 10, 4:53 pm, "Brian" <googleA...@screenlight.com> wrote:
> Hi All-
> I am getting the hang of some Perl approaches to situations. But one
> thing is bothering me. Perhaps this has been written about somewhere.
> Pointers appreciated.
>
> Can you do something in general with a set of perl package files to
> make it into a 'run once program' instead of installing it?
>
> --
>
> Today, I want to use a set of files that reads Palm OS .pdb
> databases. I will likely not ever look at this again, or perhaps once
> more a long time from now. Although the author seems to have done an
> earnest job in making a very full set of packages, his namespace
> choices were poor, in that he uses names like Mail, Raw and DateBook.
> It looks to me like those files are going to be tossed into a flat
> list in man and perl INC directories. That sounds unlucky.
>
> SO what I did was:
>
> a) copy the source code for each package called out in the desired
> final program, into a same source, but removing the 'use xxx' line.
>
> b) did so for all the required packages in reverse order, so the final
> program comes last, the most basic package is first.
>
> that seems to work, though I haven't poked at it much. please advise
Why not just install them somewhere other than your normal library?
perl Makefile.PL PREFIX=~/lib/UseOnlyOnce/
make
make test
make install
Then within a script that wants to use it:
use lib "$ENV{HOME}/lib/UseOnlyOnce";
use Mail;
use Raw;
use DateBook;
Just a suggestion,
Paul Lalli
------------------------------
Date: 10 Apr 2007 18:43:42 -0700
From: "Brian" <googleAcct@screenlight.com>
Subject: Re: Using Modules once
Message-Id: <1176255822.464375.51610@n76g2000hsh.googlegroups.com>
On Apr 10, 6:04 pm, "Paul Lalli" <mri...@gmail.com> wrote:
> On Apr 10, 4:53 pm, "Brian" <googleA...@screenlight.com> wrote:
>
> ...
> > Can you do something in general with a set of perl package files to
> > make it into a 'run once program' instead of installing it?
> ...
> > --
>
> Why not just install them somewhere other than your normal library?
>
> perl Makefile.PL PREFIX=~/lib/UseOnlyOnce/
> make
> make test
> make install
>
> Then within a script that wants to use it:
> use lib "$ENV{HOME}/lib/UseOnlyOnce";
> use Mail;
> use Raw;
> use DateBook;
>
> Just a suggestion,
> Paul Lalli
It looks like the Perl fiels would go in the specified directory, but
the man files would not. However, the man files are called Palm::xxx,
so they could be identitified.
the package trick did work, also.. more ideas welcome
------------------------------
Date: 10 Apr 2007 21:40:48 -0700
From: "dolphin" <jdxyw2004@gmail.com>
Subject: Which module can deal with sound and transform it on the net?
Message-Id: <1176266448.769909.239310@o5g2000hsb.googlegroups.com>
HI !
Which module can deal with sound and transform it on the net real-time?
can perl do this work?
capture sound,and tranform real-time.
If can.what modules can do this work.sorry for my poor english.
------------------------------
Date: Wed, 11 Apr 2007 09:46:41 +0300
From: Alex <check.sig@for.email.invalid>
Subject: Re: Why No Famous Open Source Projects From Britain/Ireland?
Message-Id: <mv%Sh.34270$_V1.20818@reader1.news.saunalahti.fi>
> Europe does seem to be good at exporting open source programmers. Oh
> hey, come on you europeans, you gotta have a sense of humor! You got
> the best weather in the world, lovely place. Would go back there if I
> had the money.
Quite off topic, but anyway... In what sense do Europeans have the best
weather in the world? Sure, we have a wide range of weather from the
freezing winters of Scandinavia to the scorching summers of the
Mediterranean, but doesn't eg. North America offer quite a wide range as
well?
--
Alex
e-mail: Domain is iki dot fi. Local-part is alext.
local-part at domain
------------------------------
Date: 10 Apr 2007 16:38:26 -0700
From: "cyl" <u8526505@gmail.com>
Subject: Win32::API cannot load any DLL?
Message-Id: <1176248305.997167.312460@w1g2000hsg.googlegroups.com>
When I used Win32::API to load my dll, perl.exe got exception. I did
some search in the archive and there's one article mentioning that the
export functions must use stdcall naming convention for Win32::API to
use. Is it true? This means that Win32::API can not support any kind
of dlls, right? Is there any fix to that? Thanks.
------------------------------
Date: Wed, 11 Apr 2007 10:05:58 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Win32::API cannot load any DLL?
Message-Id: <461c265a$0$9775$afc38c87@news.optusnet.com.au>
"cyl" <u8526505@gmail.com> wrote in message
news:1176248305.997167.312460@w1g2000hsg.googlegroups.com...
> When I used Win32::API to load my dll, perl.exe got exception. I did
> some search in the archive and there's one article mentioning that the
> export functions must use stdcall naming convention for Win32::API to
> use. Is it true? This means that Win32::API can not support any kind
> of dlls, right? Is there any fix to that? Thanks.
>
There's a patched version that claims to also handle functions declared with
'cdecl' at http://www.xs4all.nl/~itsme/projects/perl/ . (There's a link to a
ppm for it on that page.)
Other than that you can use XS or Inline::C to access the dll. (There's a
nice little example of accessing user32.dll from Inline::C near the end of
'perldoc Inline::C-Cookbook'.)
Cheers,
Rob
------------------------------
Date: 10 Apr 2007 21:36:52 -0700
From: "cyl" <u8526505@gmail.com>
Subject: Re: Win32::API cannot load any DLL?
Message-Id: <1176266212.692181.236410@w1g2000hsg.googlegroups.com>
> > some search in the archive and there's one article mentioning that the
> > export functions must use stdcall naming convention for Win32::API to
I try to build a dll myself using VS2005 and VC6 and got the following
results
stdcall cdecl
VC6 Win32::API new failed Win32::API new failed
VS2005 Win32::API new failed perl.exe got exception
None of them works. So far only Windows dlls such as Kernel32.dll
work. Do I have anything wrong?
------------------------------
Date: Wed, 11 Apr 2007 05:32:50 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Win32::API cannot load any DLL?
Message-Id: <hlso13d43t525ml994qgneh3kfqpronalo@4ax.com>
cyl wrote:
>When I used Win32::API to load my dll, perl.exe got exception. I did
>some search in the archive and there's one article mentioning that the
>export functions must use stdcall naming convention for Win32::API to
>use. Is it true? This means that Win32::API can not support any kind
>of dlls, right? Is there any fix to that? Thanks.
No, in theory, if you build your DLL right, you can call it. I've done
it in the past, so I know it works, but I'm not a C guru so I'm not the
person to tell you exactly what you're doing wrong.
--
Bart.
------------------------------
Date: Wed, 11 Apr 2007 16:20:29 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Win32::API cannot load any DLL?
Message-Id: <461c7e21$0$9770$afc38c87@news.optusnet.com.au>
"cyl" <u8526505@gmail.com> wrote in message
news:1176266212.692181.236410@w1g2000hsg.googlegroups.com...
>> > some search in the archive and there's one article mentioning that the
>> > export functions must use stdcall naming convention for Win32::API to
>
> I try to build a dll myself using VS2005 and VC6 and got the following
> results
>
> stdcall cdecl
> VC6 Win32::API new failed Win32::API new failed
> VS2005 Win32::API new failed perl.exe got exception
>
> None of them works. So far only Windows dlls such as Kernel32.dll
> work. Do I have anything wrong?
Perhaps you omitted the '.def' file ?
You should get good milage with VC 6 ... not so sure about VS2005.
The files that follow have been transcribed from another machine - beware of
typos.
-- msdll.c --
int dll_int_square (int i)
{
return i * i;
}
-- end of msdll.c --
-- msdll.def --
EXPORTS
dll_int_square
-- end of msdll.def --
Then build msdll.dll with the following command:
cl /LD /Gz msdll.c msdll.def
(The Gz switch enforces the stdcall calling convention.)
-- msdll.pl --
use Win32::API;
use warnings;
$function = Win32::API->new('msdll.dll', 'int dll_int_square(int i)',);
$return = $function->Call(12);
print $return, "\n";
-- end of msdll.pl --
For me, running 'perl msdll.dll' prints out 144 (as expected).
Cheers,
Rob
------------------------------
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 322
**************************************