[29295] in Perl-Users-Digest
Perl-Users Digest, Issue: 539 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 20 14:09:57 2007
Date: Wed, 20 Jun 2007 11:09:06 -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, 20 Jun 2007 Volume: 11 Number: 539
Today's topics:
Can't find par loader at C:/Perl/site/lib/PAR/Packer.pm <osoeder@gmx.de>
CGI.pm mystery array <runderwo@mail.win.org>
date parts in one step <stoupa@practisoft.cz>
Re: date parts in one step <mritty@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 20 Jun 2007 19:23:44 +0200
From: Oliver Soeder <osoeder@gmx.de>
Subject: Can't find par loader at C:/Perl/site/lib/PAR/Packer.pm line 101
Message-Id: <d5b88$46796298$4d392d8c$19572@news.hispeed.ch>
Hello, I want to compile Perl scripts to .exe on Windows.
I followed the instruction on this site:
http://www.expertsrt.com/tutorials/Matt/perlPAR.html#download
but if I execute pp, I receive that error message:
Can't find par loader at C:/Perl/site/lib/PAR/Packer.pm line 101
Thank you
Oliver
------------------------------
Date: Wed, 20 Jun 2007 16:14:26 -0000
From: "runderwo@mail.win.org" <runderwo@mail.win.org>
Subject: CGI.pm mystery array
Message-Id: <1182356066.221447.298970@i13g2000prf.googlegroups.com>
Using CGI.pm from perl 5.8.8.
If I have a form variable named foo[], I noticed that using
Data::Dumper to print the contents of CGI::param for that variable:
warn Dumper $query->param('foo[]');
returns:
<!-- warning: $VAR1 = 'ARRAY(0x82996a8)'; -->
You would think, ok, it's just printing the reference to an empty
array. Odd since Dumper usually recognizes references and prints
their structure, but whatever.
The really odd thing is that if the form variable actually submitted
values, I get something like this:
<!-- warning: $VAR1 = 'address@domain.com';
$VAR2 = 'ADDR2@ADDR.COM';
$VAR3 = 'ARRAY(0x8297a98)'; -->
What in the world is the ARRAY() member in that case? It's certainly
not containing the form values, since they are members of the list
alongside it.
Even stranger is that the member is actually a string. If I try to
dereference it with @{$query->param($key)}, I get an error about using
a string as an array ref. If I assign to a list:
my @foo = $query->param($key);
then I get a list of size 1 with the string 'ARRAY(0x8297a98)' as the
first member.
I have no idea what this means. First time I ever noticed it. Does
something seem wrong here?
------------------------------
Date: Wed, 20 Jun 2007 18:28:15 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: date parts in one step
Message-Id: <f5bkld$1t8j$1@ns.felk.cvut.cz>
I need to get month and year values from localtime() so I wrote this:
# get values in Unix format
my ($month, $year) = (localtime)[4, 5];
# convert to human format
$month++;
$year += 1900;
Is possible to do the same in one step?
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
------------------------------
Date: Wed, 20 Jun 2007 10:01:55 -0700
From: Paul Lalli <mritty@gmail.com>
Subject: Re: date parts in one step
Message-Id: <1182358915.941635.54060@q69g2000hsb.googlegroups.com>
On Jun 20, 12:28 pm, "Petr Vileta" <sto...@practisoft.cz> wrote:
> I need to get month and year values from localtime() so I wrote this:
>
> # get values in Unix format
> my ($month, $year) = (localtime)[4, 5];
> # convert to human format
> $month++;
> $year += 1900;
>
> Is possible to do the same in one step?
Here's a couple ways:
my ($m, $y) = split / /, strftime("%m %Y", localtime);
my ($m, $y) = ((localtime)[4] + 1, (localtime)[5] + 1900);
Neither of them are particularly "good", in my mind. The first
requires you to import POSIX::strftime and will give you the month
with a 0 preceding single-digit months. The second requires two
separate calls to localtime.
Paul Lalli
------------------------------
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 539
**************************************