[31204] in Perl-Users-Digest
Perl-Users Digest, Issue: 2449 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 29 14:09:47 2009
Date: Fri, 29 May 2009 11:09:10 -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 Fri, 29 May 2009 Volume: 11 Number: 2449
Today's topics:
basic directory watcher - sanity check <jack_posemsky@yahoo.com>
Re: how can perl respond to someone's HTTP POST <jack_posemsky@yahoo.com>
Re: how can perl respond to someone's HTTP POST <jack_posemsky@yahoo.com>
Re: how can perl respond to someone's HTTP POST <jimsgibson@gmail.com>
Re: how can perl respond to someone's HTTP POST <jack_posemsky@yahoo.com>
Re: how can perl respond to someone's HTTP POST <mvdwege@maily.com>
Re: how can perl respond to someone's HTTP POST <glennj@ncf.ca>
Re: how can perl respond to someone's HTTP POST <jack_posemsky@yahoo.com>
Re: how can perl respond to someone's HTTP POST <smallpond@juno.com>
Re: Is PERL good for a linguist new to programming? <hjp-usenet2@hjp.at>
Parallel execution of a perl script <jack_posemsky@yahoo.com>
Re: Parallel execution of a perl script <glex_no-spam@qwest-spam-no.invalid>
Re: Perl and locales <kxtells@gmail.com>
Re: Perl and locales <1usa@llenroc.ude.invalid>
Re: Perl and locales <hjp-usenet2@hjp.at>
Re: Perl error response <marc.girod@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 29 May 2009 09:01:22 -0700 (PDT)
From: Jack <jack_posemsky@yahoo.com>
Subject: basic directory watcher - sanity check
Message-Id: <ea602f6b-9e5e-41a9-8416-a245048298ae@b1g2000vbc.googlegroups.com>
Hi
I use activestate and they dont support with my version of perl Cpan
directory watcher.. is there a better way to watch a directory for a
file and then process it than the below, perl, shareware, or through a
low cost product ? The infinite loop code below causes my windows
server 2003 to have strange behavior after its been running a few days
(blinking screen, requiring reboot, etc). I know its related b/c when
this service is stopped, the system is fine. I checked File Monitor
also but you still need something that continuously checks something,
the array in its case...
while (1) {
@filelist=();
@filelist = split(/\n/, $var = `dir /A-D /B /O-D e:\\mail\inboxes\
\testbox`);
foreach (@filelist) {
dobasicstuff();
movefile();
sleep 3;
}
------------------------------
Date: Fri, 29 May 2009 08:08:10 -0700 (PDT)
From: Jack <jack_posemsky@yahoo.com>
Subject: Re: how can perl respond to someone's HTTP POST
Message-Id: <ca1a68d5-9768-437e-9bbc-a968e7e2feaf@s21g2000vbb.googlegroups.com>
On May 29, 12:21=A0am, Mart van de Wege <mvdw...@maily.com> wrote:
> Jack <jack_posem...@yahoo.com> writes:
> > Hi there,
>
> > Simple concept but its not clear anywhere how to implement a response
> > to a server (that has posted to my server) with some result. =A0does
> > anyone know how, is a CPAN module required to do this ? =A0I have seen
> > LWP for posting, but its not clear how to RESPOND to somebody's post
> > to my server...
>
> Well, if you know how the other end handles your client LWP POSTs, then
> you should have a good clue...
>
> In short, you have to write a HTTP server, or hook into an existing
> one. Perl has the tools to do both, but before I go into details, I
> really need to know what you do have on your end. Do you have a HTTP
> server already running? If yes, which one?
>
> Mart
>
> --
> "We will need a longer wall when the revolution comes."
> --- AJS, quoting an uncertain source.
Hi I am using a Windows Server 2003 system running IIS. I have other
computers on the web that will be posting to a URL of mine (a perl ASP
webpage), and that webpage acquires those posted variables, does a
database lookup, and all I want to do is return the lookup results to
the other system that requested it via a post.. ! Basic. is this
possible, or do I just simply post back to the other server. I am
familiar with using LWP for posting to a URL, but again, I have no
idea, and would like to see the code, to provide a direct REPLY with
data back to the poster. I am not looking for a digression on "man
CGI", as the first poster indicated.
Thank you !
Jack
------------------------------
Date: Fri, 29 May 2009 08:10:26 -0700 (PDT)
From: Jack <jack_posemsky@yahoo.com>
Subject: Re: how can perl respond to someone's HTTP POST
Message-Id: <e019f80e-29dd-4847-af1d-49ca26e9af88@r34g2000vbi.googlegroups.com>
On May 29, 8:08=A0am, Jack <jack_posem...@yahoo.com> wrote:
> On May 29, 12:21=A0am, Mart van de Wege <mvdw...@maily.com> wrote:
>
>
>
>
>
> > Jack <jack_posem...@yahoo.com> writes:
> > > Hi there,
>
> > > Simple concept but its not clear anywhere how to implement a response
> > > to a server (that has posted to my server) with some result. =A0does
> > > anyone know how, is a CPAN module required to do this ? =A0I have see=
n
> > > LWP for posting, but its not clear how to RESPOND to somebody's post
> > > to my server...
>
> > Well, if you know how the other end handles your client LWP POSTs, then
> > you should have a good clue...
>
> > In short, you have to write a HTTP server, or hook into an existing
> > one. Perl has the tools to do both, but before I go into details, I
> > really need to know what you do have on your end. Do you have a HTTP
> > server already running? If yes, which one?
>
> > Mart
>
> > --
> > "We will need a longer wall when the revolution comes."
> > --- AJS, quoting an uncertain source.
>
> Hi I am using a Windows Server 2003 system running IIS. =A0I have other
> computers on the web that will be posting to a URL of mine (a perl ASP
> webpage), and that webpage acquires those posted variables, does a
> database lookup, and all I want to do is return the lookup results to
> the other system that requested it via a post.. ! =A0Basic. =A0is this
> possible, or do I just simply post back to the other server. =A0I am
> familiar with using LWP for posting to a URL, but again, I have no
> idea, and would like to see the code, to provide a direct REPLY with
> data back to the poster. =A0I am not looking for a digression on "man
> CGI", as the first poster indicated.
> Thank you !
>
> Jack- Hide quoted text -
>
> - Show quoted text -
Is this it ? http://search.cpan.org/~gaas/libwww-perl-5.826/lib/HTTP/Resp=
onse.pm
HTTP::Response - HTTP style response message
SYNOPSIS
Response objects are returned by the request() method of the
LWP::UserAgent:
# ...
$response =3D $ua->request($request)
if ($response->is_success) {
print $response->content;
}
else {
print STDERR $response->status_line, "\n";
}
------------------------------
Date: Fri, 29 May 2009 08:29:59 -0700
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: how can perl respond to someone's HTTP POST
Message-Id: <290520090829598371%jimsgibson@gmail.com>
In article
<718f95f3-5c45-48e0-b544-514be297e8e0@h2g2000yqg.googlegroups.com>,
Jack <jack_posemsky@yahoo.com> wrote:
> Hi there,
>
> Simple concept but its not clear anywhere how to implement a response
> to a server (that has posted to my server) with some result. does
> anyone know how, is a CPAN module required to do this ? I have seen
> LWP for posting, but its not clear how to RESPOND to somebody's post
> to my server...
A server that is posting a request to your server is acting as a
client. The way to generate a dynamic response to that request is to
have the URL of the request point to a program (or programmable page)
instead of a static page. The CGI protocol is one way to do this. There
are others: ASP, JSP, PHP, etc.
LWP is a client system that may be used to emulate a browser. It does
not respond to requests.
--
Jim Gibson
------------------------------
Date: Fri, 29 May 2009 08:39:38 -0700 (PDT)
From: Jack <jack_posemsky@yahoo.com>
Subject: Re: how can perl respond to someone's HTTP POST
Message-Id: <b36f2918-da07-4b48-b57a-52ad1e42dd59@r13g2000vbr.googlegroups.com>
On May 29, 8:29=A0am, Jim Gibson <jimsgib...@gmail.com> wrote:
> In article
> <718f95f3-5c45-48e0-b544-514be297e...@h2g2000yqg.googlegroups.com>,
>
> Jack <jack_posem...@yahoo.com> wrote:
> > Hi there,
>
> > Simple concept but its not clear anywhere how to implement a response
> > to a server (that has posted to my server) with some result. =A0does
> > anyone know how, is a CPAN module required to do this ? =A0I have seen
> > LWP for posting, but its not clear how to RESPOND to somebody's post
> > to my server...
>
> A server that is posting a request to your server is acting as a
> client. The way to generate a dynamic response to that request is to
> have the URL of the request point to a program (or programmable page)
> instead of a static page. The CGI protocol is one way to do this. There
> are others: ASP, JSP, PHP, etc.
>
> LWP is a client system that may be used to emulate a browser. It does
> not respond to requests.
>
> --
> Jim Gibson
Exactly..BUT, how exactly do I have the Perl/ASP page respond back ?
"print" to the page ? Trying to get tactical level here, ie code.
------------------------------
Date: Fri, 29 May 2009 17:46:07 +0200
From: Mart van de Wege <mvdwege@maily.com>
Subject: Re: how can perl respond to someone's HTTP POST
Message-Id: <86my8v6hfk.fsf@gareth.avalon.lan>
Jack <jack_posemsky@yahoo.com> writes:
> On May 29, 12:21Â am, Mart van de Wege <mvdw...@maily.com> wrote:
>> Jack <jack_posem...@yahoo.com> writes:
>> > Hi there,
>>
>> > Simple concept but its not clear anywhere how to implement a response
>> > to a server (that has posted to my server) with some result. Â does
>> > anyone know how, is a CPAN module required to do this ? Â I have seen
>> > LWP for posting, but its not clear how to RESPOND to somebody's post
>> > to my server...
>>
>> Well, if you know how the other end handles your client LWP POSTs, then
>> you should have a good clue...
>>
>> In short, you have to write a HTTP server, or hook into an existing
>> one. Perl has the tools to do both, but before I go into details, I
>> really need to know what you do have on your end. Do you have a HTTP
>> server already running? If yes, which one?
>>
>> Mart
>>
>
> Hi I am using a Windows Server 2003 system running IIS. I have other
> computers on the web that will be posting to a URL of mine (a perl ASP
> webpage), and that webpage acquires those posted variables, does a
> database lookup, and all I want to do is return the lookup results to
> the other system that requested it via a post.. ! Basic. is this
> possible, or do I just simply post back to the other server. I am
> familiar with using LWP for posting to a URL, but again, I have no
> idea, and would like to see the code, to provide a direct REPLY with
> data back to the poster. I am not looking for a digression on "man
> CGI", as the first poster indicated.
> Thank you !
First off, snip signatures, please.
Second, a digression on CGI is *exactly* what you need.
On the gripping hand, I don't know anything about Windows and IIS, so
how you would go about serverside programming in that environment I am
going to have to leave to someone else.
Mart
--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.
------------------------------
Date: 29 May 2009 15:55:12 GMT
From: Glenn Jackman <glennj@ncf.ca>
Subject: Re: how can perl respond to someone's HTTP POST
Message-Id: <slrnh201b1.p82.glennj@smeagol.ncf.ca>
At 2009-05-29 11:08AM, "Jack" wrote:
[...]
> Hi I am using a Windows Server 2003 system running IIS. I have other
> computers on the web that will be posting to a URL of mine (a perl ASP
> webpage), and that webpage acquires those posted variables, does a
> database lookup, and all I want to do is return the lookup results to
> the other system that requested it via a post.. ! Basic. is this
> possible, or do I just simply post back to the other server. I am
> familiar with using LWP for posting to a URL, but again, I have no
> idea, and would like to see the code, to provide a direct REPLY with
> data back to the poster. I am not looking for a digression on "man
> CGI", as the first poster indicated.
If you had given us these details in the first place, you might have
been spared that horrifying "digression"
Let your web server do it's job. Your asp page doesn't have to worry
about how the request got to it -- it just needs to return some content.
What format for the data are you supposed to provide? Will CSV do?
IMO, your asp should output a Content-Type: text/plain header followed
by properly-quoted CSV data.
--
Glenn Jackman
Write a wise saying and your name will live forever. -- Anonymous
------------------------------
Date: Fri, 29 May 2009 09:05:40 -0700 (PDT)
From: Jack <jack_posemsky@yahoo.com>
Subject: Re: how can perl respond to someone's HTTP POST
Message-Id: <7ca99b5f-040d-435a-ab9c-387e59a7c422@l32g2000vba.googlegroups.com>
On May 29, 8:55=A0am, Glenn Jackman <gle...@ncf.ca> wrote:
> At 2009-05-29 11:08AM, "Jack" wrote:
> [...]
>
> > =A0Hi I am using a Windows Server 2003 system running IIS. =A0I have ot=
her
> > =A0computers on the web that will be posting to a URL of mine (a perl A=
SP
> > =A0webpage), and that webpage acquires those posted variables, does a
> > =A0database lookup, and all I want to do is return the lookup results t=
o
> > =A0the other system that requested it via a post.. ! =A0Basic. =A0is th=
is
> > =A0possible, or do I just simply post back to the other server. =A0I am
> > =A0familiar with using LWP for posting to a URL, but again, I have no
> > =A0idea, and would like to see the code, to provide a direct REPLY with
> > =A0data back to the poster. =A0I am not looking for a digression on "ma=
n
> > =A0CGI", as the first poster indicated.
>
> If you had given us these details in the first place, you might have
> been spared that horrifying "digression"
>
> Let your web server do it's job. =A0Your asp page doesn't have to worry
> about how the request got to it -- it just needs to return some content.
>
> What format for the data are you supposed to provide? =A0Will CSV do?
>
> IMO, your asp should output a Content-Type: text/plain header followed
> by properly-quoted CSV data.
>
> --
> Glenn Jackman
> =A0 =A0 Write a wise saying and your name will live forever. -- Anonymous
Thanks ! actually it will output XML, but just knowing how to output
anything is a start - what is the code I need to provide so this
happens ?? My ASP page does a database lookup, then what is the code
I need to hand off the contents of these variables to something ??
------------------------------
Date: Fri, 29 May 2009 13:23:53 -0400
From: Steve C <smallpond@juno.com>
Subject: Re: how can perl respond to someone's HTTP POST
Message-Id: <gvp5nn$dpg$1@news.eternal-september.org>
Jack wrote:
> On May 29, 8:29 am, Jim Gibson <jimsgib...@gmail.com> wrote:
>> In article
>> <718f95f3-5c45-48e0-b544-514be297e...@h2g2000yqg.googlegroups.com>,
>>
>> Jack <jack_posem...@yahoo.com> wrote:
>>> Hi there,
>>> Simple concept but its not clear anywhere how to implement a response
>>> to a server (that has posted to my server) with some result. does
>>> anyone know how, is a CPAN module required to do this ? I have seen
>>> LWP for posting, but its not clear how to RESPOND to somebody's post
>>> to my server...
>> A server that is posting a request to your server is acting as a
>> client. The way to generate a dynamic response to that request is to
>> have the URL of the request point to a program (or programmable page)
>> instead of a static page. The CGI protocol is one way to do this. There
>> are others: ASP, JSP, PHP, etc.
>>
>> LWP is a client system that may be used to emulate a browser. It does
>> not respond to requests.
>>
>> --
>> Jim Gibson
>
> Exactly..BUT, how exactly do I have the Perl/ASP page respond back ?
> "print" to the page ? Trying to get tactical level here, ie code.
The way the CGI protocol works is that the web server (IIS) receives the
request and calls the perl program on the server, which outputs HTML to
stdout. That output is captured by the web server and returned to the
requester.
The perl CGI module does some of the work for you, like hiding whether the
request is GET or POST. There are many tutorials about CGI available,
here is one:
http://support.microsoft.com/kb/245225
------------------------------
Date: Fri, 29 May 2009 18:40:40 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Is PERL good for a linguist new to programming?
Message-Id: <slrnh20409.pit.hjp-usenet2@hrunkner.hjp.at>
On 2009-05-28 20:44, Jürgen Exner <jurgenex@hotmail.com> wrote:
> "Uri Guttman" <uri@StemSystems.com> wrote:
>> FS> Uri and his ilk are why I would advise against thinking you can
>> FS> conquer the many idioms of perl by relying on usenet.
>
> Actually Usenet is a poorly suited medium to learn any task. Books,
> videos, classes, tutorials, one-on-one tutoring, ..., pretty much
> anything is far more effective than Usenet posts when it comes to
> learning a particular skill.
>
> On the other hand Usenet is a terrific resource for finding answers to
> specific questions.
I disagree with that, actually. When you ask a specific question on
Usenet, there is no guarantee that this question is answered at all and
if it is you probably get at least three different answers and still
have to decide which one (if any) is correct.
I think Usenet is a great discussion medium. As a discussion medium it
is a great tool to learn more about about a field in which you already
have at least basic knowledge. No so much by asking specific questions
than by discussing things, thinking about the questions and answers
given by others, and researching the topics mentioned in discussions.
hp
------------------------------
Date: Fri, 29 May 2009 08:21:55 -0700 (PDT)
From: Jack <jack_posemsky@yahoo.com>
Subject: Parallel execution of a perl script
Message-Id: <ac680367-e284-4755-bb87-ab757c154a4e@g19g2000vbi.googlegroups.com>
Hi all,
I have a perl script that currently is performing a task in serial
fashion (in this case, emailing a list of users with dynamic content)
---> is there a way to run this in a more parallel fashion. One idea
I have is multiple scripts running, each managing which users it
emails (by opening a single list of email addresses in a file,
selecting and inserting some kind of "marker" to indicate a group of
people to email were 'processed' in the file itself, then close the
file, or something along these lines). I essentially want to split up
the task of email execution into a parallel mode instead of serial.
Just wondering how to get a script like this to really scale up while
working within the confines of Perl...if anyone has ideas, that would
be great.
Thanks,
Jack
------------------------------
Date: Fri, 29 May 2009 10:59:11 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Parallel execution of a perl script
Message-Id: <4a20064f$0$89869$815e3792@news.qwest.net>
Jack wrote:
> Hi all,
>
> I have a perl script that currently is performing a task in serial
> fashion (in this case, emailing a list of users with dynamic content)
> ---> is there a way to run this in a more parallel fashion. [...]
Search for parallel at http://search.cpan.org/
or, to see how to to fork a process:
perldoc -f fork
or for a particular module
Parallel::ForkManager
or...
------------------------------
Date: Fri, 29 May 2009 06:28:53 -0500
From: kxtells <kxtells@gmail.com>
Subject: Re: Perl and locales
Message-Id: <dM2dnWFXhtZoW4LXnZ2dnUVZ8mti4p2d@giganews.com>
On Thu, 28 May 2009 19:18:36 +0000, A. Sinan Unur wrote:
> But it is not a minimal example one can run by just copying and pasting.
The original program it's a little bit large and I did not wanted to
flood without reason.
How about this one? (little example)
#!/usr/bin/perl
#uses
use Date::Parse;
use Date::Format;
use POSIX qw(strftime locale_h);
#first, set proper locales
my $old_locale = setlocale(LC_TIME);
print "old_locale:".$old_locale."\n";
setlocale(LC_TIME, 'es_ES.utf8') or die "LOCALE TROUBLE!";
my $new_locale = setlocale(LC_TIME);
print "new_locale:".$new_locale."\n";
#test formatting date
print strftime( "%A, %B %d, %Y\n", localtime );
print time2str("%a %e", localtime)."\n";
the output is:
old_locale:en_US.UTF-8
new_locale:es_ES.utf8
viernes, mayo 29, 2009
Thu 1
> You don't show how you call this function, but the empty prototype and
> the incorrect @_[0] (should be $_[0]) are annoying and makes me
> suspicious of what else might be happening in the parts you do not show.
got it! Always learning.
>
> In any case, the following works for me on ArchLinux using the
> distribution's Perl 5.10. Does it work in your case?
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> use POSIX qw(strftime locale_h);
>
> my $old_locale = setlocale(LC_TIME);
> print $old_locale."\n";
>
> setlocale(LC_TIME, 'tr_TR.utf8') or die "LOCALE TROUBLE!"; my
> $new_locale = setlocale(LC_TIME);
> print $new_locale."\n";
>
> print strftime( "%A, %B %d, %Y\n", localtime );
Yes, this too works for me.
So with strftime function the locale setting is used corrertly, but not
with time2str function of Date::Format.
It seems to me a strange thing because in
http://search.cpan.org/~gbarr/TimeDate-1.16/lib/Date/Format.pm
chapter "CONVERSION SPECIFICATION" says that the appropiate characters are
determined by the LC_TIME of the program locale.
Anyway, working with strftime!
Thanks a lot!
Kxtells
------------------------------
Date: Fri, 29 May 2009 11:48:03 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Perl and locales
Message-Id: <Xns9C1A4F59D74E3asu1cornelledu@127.0.0.1>
kxtells <kxtells@gmail.com> wrote in
news:dM2dnWFXhtZoW4LXnZ2dnUVZ8mti4p2d@giganews.com:
> On Thu, 28 May 2009 19:18:36 +0000, A. Sinan Unur wrote:
>
>
>> But it is not a minimal example one can run by just copying and
>> pasting.
>
> The original program it's a little bit large and I did not wanted to
> flood without reason.
> How about this one? (little example)
*Great*
> use Date::Format;
<snipped for brevity>
> #test formatting date
> print strftime( "%A, %B %d, %Y\n", localtime );
> print time2str("%a %e", localtime)."\n";
>
>
> the output is:
>
> old_locale:en_US.UTF-8
> new_locale:es_ES.utf8
> viernes, mayo 29, 2009
> Thu 1
>
...
> So with strftime function the locale setting is used corrertly, but
> not with time2str function of Date::Format.
> It seems to me a strange thing because in
> http://search.cpan.org/~gbarr/TimeDate-1.16/lib/Date/Format.pm
> chapter "CONVERSION SPECIFICATION" says that the appropiate characters
> are determined by the LC_TIME of the program locale.
You know, I had never used Date::Format, but I just noticed:
http://search.cpan.org/~gbarr/TimeDate-1.16/lib/Date/Format.pm#MULTI-LANGUAGE_SUPPORT
<blockquote>
Date::Format is capable of formating into several languages,
these are English, French, German and Italian. Changing the
language is done via a static method call, for example
Date::Format->language('German');
will change the language in which all subsequent dates are formatted.
This is only a first pass, I am considering changing this to be
$lang = Date::Language->new('German');
$lang->time2str("%a %b %e %T %Y\n", time);
I am open to suggestions on this.
</blockquote>
http://search.cpan.org/~gbarr/TimeDate-1.16/ lists additional languages.
'Spanish' is not among them.
In any case, thanks to your post, I learned that one needs to use
setlocale(LC_TIME, 'spanish') or die "LOCALE TROUBLE!";
to get this program to work on Windows.
Sinan
--
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: Fri, 29 May 2009 19:49:18 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Perl and locales
Message-Id: <slrnh2080u.t07.hjp-usenet2@hrunkner.hjp.at>
On 2009-05-28 19:18, A. Sinan Unur <1usa@llenroc.ude.invalid> wrote:
> [sinan@kas ~]$ t.pl
> en_US.utf8
> tr_TR.utf8
> Persembe, Mayis 28, 2009
>
> (I got rid of the accented Turkish characters for pasting). This example
> also points out a little problem. The preferred way to display this date
> in Turkish would have been
>
> 28 Mayis 2009, Persembe
strftime is running out of conversion specifier characters. There is
%x The preferred date representation for the current locale
without the time.
but one would need (at least) three "preferred date representations":
One in all-numerical form, one with the full month name and one with the
abbreviated month name.
On Debian, %x uses the all-numerical format for all languages I tried:
en_US.UTF-8: 05/29/2009
tr_TR.utf8 : 29-05-2009
es_ES.utf8 : 29/05/09
de_AT.utf8 : 2009-05-29
%Ex does the same (although it could use some unspecified "alternate
format").
I guess the best way to handle this in an application is to make the
strftime formatting string configurable.
hp
------------------------------
Date: Fri, 29 May 2009 08:28:17 -0700 (PDT)
From: Marc Girod <marc.girod@gmail.com>
Subject: Re: Perl error response
Message-Id: <a606edf1-9c0b-4dcb-88f3-ed58347ec284@x3g2000yqa.googlegroups.com>
On May 29, 5:53=A0am, s...@netherlands.com wrote:
> Any quick way to do this?
use Mail::Sendmail;
...
my %mail =3D (To =3D> $admin,
From =3D> $banned,
Subject =3D> $as_requested,
Message =3D> $msg);
while(1) {sendmail(%mail) or warn $Mail::Sendmail::error; sleep 5;}
Is that what you were asking?
I guess she'll stop to send you mail,
and you'll get banned, indeed.
Marc
------------------------------
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 2449
***************************************