[28172] in Perl-Users-Digest
Perl-Users Digest, Issue: 9536 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jul 29 03:05:58 2006
Date: Sat, 29 Jul 2006 00:05: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 Sat, 29 Jul 2006 Volume: 10 Number: 9536
Today's topics:
Re: adding a string ~300 times axel@white-eagle.invalid.uk
Re: adding a string ~300 times <bootiack@yahoo.com>
Re: adding a string ~300 times <bootiack@yahoo.com>
Amending Posting Guidelines [was re: Improving performa axel@white-eagle.invalid.uk
Re: Amending Posting Guidelines [was re: Improving perf <1usa@llenroc.ude.invalid>
Re: Amending Posting Guidelines [was re: Improving perf <noreply@gunnar.cc>
Re: Efficiently convert characters to octal representat <sisyphus1@nomail.afraid.org>
Re: Efficiently convert characters to octal representat xhoster@gmail.com
Re: Efficiently convert characters to octal representat <someone@example.com>
Re: Efficiently convert characters to octal representat <benmorrow@tiscali.co.uk>
Re: Efficiently convert characters to octal representat <benmorrow@tiscali.co.uk>
Re: Improving performance of a simple Perl script axel@white-eagle.invalid.uk
Re: Improving performance of a simple Perl script <someone@example.com>
Re: Improving performance of a simple Perl script vfoley@gmail.com
Re: libwww-POST Issue <ced@blv-sam-01.ca.boeing.com>
new CPAN modules on Sat Jul 29 2006 (Randal Schwartz)
Re: Perl 6 <whoami@whereami.net>
Re: Problem with perl script and form <noreply@gunnar.cc>
Re: same code diff result <someone@example.com>
Re: Strange characters using Term::Readline on Win32 <sisyphus1@nomail.afraid.org>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 28 Jul 2006 22:43:45 GMT
From: axel@white-eagle.invalid.uk
Subject: Re: adding a string ~300 times
Message-Id: <Bqwyg.7317$5K2.4375@fed1read03>
gavino <bootiack@yahoo.com> wrote:
Please don't top post.
> :1,$s/\(internal.bak.*$\)/\1^V^M masters { 172.16.100.11; }; ^V^M
>> > I don't know how to do this in vi since it involves adding a string on
>> > a new line below each occourance of .bak";
>>
>> :1,$s/\(internal.bak.*$\)/\1^V^M masters { 172.16.100.11; }; ^V^M
> How would I run that perl code if the file is called
> named.conf.testing?
> Is that a tab in the middle of the code?
> [snip]
That was a vi method of doing it :)
I left in spaces from your original example... not that they matter,
but did accidentally add a newline... not that that matters either.
Axel
------------------------------
Date: 28 Jul 2006 23:16:02 -0700
From: "gavino" <bootiack@yahoo.com>
Subject: Re: adding a string ~300 times
Message-Id: <1154153762.824045.115920@p79g2000cwp.googlegroups.com>
AWESOME
this worked once I subbed in (my string) for (added_line)
KICK ASS
Michele Dondi wrote:
> On 28 Jul 2006 13:29:58 -0700, "gavino" <bootiack@yahoo.com> wrote:
>
> >how would a perler add that line below each instance of .bak"; ?
>
> perl -lpi -e '$_ .= "\nadded_line" if /\.bak";$/'
>
>
> Michele
------------------------------
Date: 28 Jul 2006 23:18:18 -0700
From: "gavino" <bootiack@yahoo.com>
Subject: Re: adding a string ~300 times
Message-Id: <1154153898.211078.169400@75g2000cwc.googlegroups.com>
What is top post?
I dont understand this response?
That should be run in vi?
axel@white-eagle.invalid.uk wrote:
> gavino <bootiack@yahoo.com> wrote:
>
> Please don't top post.
>
> > :1,$s/\(internal.bak.*$\)/\1^V^M masters { 172.16.100.11; }; ^V^M
>
> >> > I don't know how to do this in vi since it involves adding a string on
> >> > a new line below each occourance of .bak";
> >>
> >> :1,$s/\(internal.bak.*$\)/\1^V^M masters { 172.16.100.11; }; ^V^M
>
> > How would I run that perl code if the file is called
> > named.conf.testing?
> > Is that a tab in the middle of the code?
> > [snip]
>
> That was a vi method of doing it :)
>
> I left in spaces from your original example... not that they matter,
> but did accidentally add a newline... not that that matters either.
>
> Axel
------------------------------
Date: Fri, 28 Jul 2006 22:54:45 GMT
From: axel@white-eagle.invalid.uk
Subject: Amending Posting Guidelines [was re: Improving performance of a simple Perl script]
Message-Id: <VAwyg.7318$5K2.5490@fed1read03>
[Someone wrote... the third in a week]
> I wrote a little script in Perl to make stats on a log file. You can
> view the source at: http://pastebin.ca/104391 . When running on an
Would it be possible to amend the Posting Guidelines so that it is made
clear that posting URLs for scripts is unwanted and unnecessary and
that they should be posted to the group?
Doing so already contravenes the Guidelines on posting the smallest
reasonable example of a problem, let alone compounding them.
Just wondering if others agree?
Axel
------------------------------
Date: Sat, 29 Jul 2006 03:08:21 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Amending Posting Guidelines [was re: Improving performance of a simple Perl script]
Message-Id: <Xns980EEB7B1F568asu1cornelledu@127.0.0.1>
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in
news:4ivotsF5d2q1U1@individual.net:
> axel@white-eagle.invalid.uk wrote:
>> [Someone wrote... the third in a week]
>>>I wrote a little script in Perl to make stats on a log file. You can
>>>view the source at: http://pastebin.ca/104391 . When running on an
>>
>> Would it be possible to amend the Posting Guidelines so that it is
>> made clear that posting URLs for scripts is unwanted and unnecessary
>> and that they should be posted to the group?
>>
>> Doing so already contravenes the Guidelines on posting the smallest
>> reasonable example of a problem, let alone compounding them.
>>
>> Just wondering if others agree?
>
> One advantage with making code available via the web is that it
> eliminates the risk that the code gets screwed up when newsreaders
> wrap long lines. I for one don't think it's warranted to recommend
> against it.
UseNet posts get archived, temporary web pages really don't.
Posting a question referring to code on a temporary web page is almost the
same thing as setting X-No-Archive.
Another point: When an unknown gmail lackey posts a cloaked URL, there is
no knowing where such a link leads. The last thing I want is to end up
with a keylogger on my computer because I tried to help someone who is
only looking out for number one.
I haven't been able to automate this, but people who refer to code posted
on temporary web pages usually end up in my killfile. (I know, I am not
very selective ;-)
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://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
------------------------------
Date: Sat, 29 Jul 2006 02:36:09 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Amending Posting Guidelines [was re: Improving performance of a simple Perl script]
Message-Id: <4ivotsF5d2q1U1@individual.net>
axel@white-eagle.invalid.uk wrote:
> [Someone wrote... the third in a week]
>>I wrote a little script in Perl to make stats on a log file. You can
>>view the source at: http://pastebin.ca/104391 . When running on an
>
> Would it be possible to amend the Posting Guidelines so that it is made
> clear that posting URLs for scripts is unwanted and unnecessary and
> that they should be posted to the group?
>
> Doing so already contravenes the Guidelines on posting the smallest
> reasonable example of a problem, let alone compounding them.
>
> Just wondering if others agree?
One advantage with making code available via the web is that it
eliminates the risk that the code gets screwed up when newsreaders wrap
long lines. I for one don't think it's warranted to recommend against it.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Sat, 29 Jul 2006 09:00:21 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Efficiently convert characters to octal representation
Message-Id: <44ca97f6$0$1211$afc38c87@news.optusnet.com.au>
<xhoster@gmail.com> wrote in message
.
.
>
> Anyway, if really need the speed, this Inline C code is about 3 times
> faster than sol2.
>
A neat little Inline C routine .... so I saved the code and ran it:
-----------------------------
D:\pscrpt\inline\>cat char2octal.pl
use warnings;
use Inline C => Config =>
BUILD_NOISY => 1;
use Inline C => <<'EOC';
SV* c2o(SV* a) {
STRLEN len;
int i;
unsigned char * s;
SV* ret;
s = SvPV(a,len);
ret = newSV(4*len);
for (i=0; i<len; i++,s++) {
sv_catpvf(ret, "\\%03o", *s);
}
return ret;
}
EOC
print c2o('abcdABCD'), "\n"; #line 22
D:\pscrpt\inline\>perl char2octal.pl
Use of uninitialized value in subroutine entry at char2octal.pl line 22.
\141\142\143\144\101\102\103\104
-----------------------------
I'm sure it's one of those questions that will make me go "Doh!", but I
can't for the life of me see what is causing that "uninitialized" warning.
Any hints ? (I'm running perl 5.8.8 on Win32.)
Cheers,
Rob
------------------------------
Date: 28 Jul 2006 23:55:59 GMT
From: xhoster@gmail.com
Subject: Re: Efficiently convert characters to octal representation
Message-Id: <20060728200305.766$6Y@newsreader.com>
"Sisyphus" <sisyphus1@nomail.afraid.org> wrote:
> <xhoster@gmail.com> wrote in message
> .
> .
> >
> > Anyway, if really need the speed, this Inline C code is about 3 times
> > faster than sol2.
> >
>
> A neat little Inline C routine .... so I saved the code and ran it:
>
> -----------------------------
> D:\pscrpt\inline\>cat char2octal.pl
> use warnings;
> use Inline C => Config =>
> BUILD_NOISY => 1;
>
> use Inline C => <<'EOC';
>
> SV* c2o(SV* a) {
> STRLEN len;
> int i;
> unsigned char * s;
> SV* ret;
> s = SvPV(a,len);
> ret = newSV(4*len);
> for (i=0; i<len; i++,s++) {
> sv_catpvf(ret, "\\%03o", *s);
> }
> return ret;
> }
>
> EOC
>
> print c2o('abcdABCD'), "\n"; #line 22
>
> D:\pscrpt\inline\>perl char2octal.pl
> Use of uninitialized value in subroutine entry at char2octal.pl line 22.
> \141\142\143\144\101\102\103\104
> -----------------------------
>
> I'm sure it's one of those questions that will make me go "Doh!", but I
> can't for the life of me see what is causing that "uninitialized"
> warning. Any hints ? (I'm running perl 5.8.8 on Win32.)
Ah, I forgot to turn on warnings and so never saw it.
Apparently sv_catpvf, unlike .= operator, doesn't care for undefined
values. So make that:
ret = newSV(4*len);
sv_setpv(ret, "");
for (i=0; i<len; i++,s++) {
I guess Inline warnings all get reported as being at subroutine entry?
For what it's worth, I've made another uglier one that is about twice again
as fast. This is going to wrap like crazy:
Xho
SV* sol32(SV* a) {
static const char * cache[]={"\\000","\\001","\\002","\\003","\\004",
"\\005","\\006","\\007","\\010","\\011","\\012","\\013","\\014","\\015",
"\\016","\\017","\\020","\\021","\\022","\\023","\\024","\\025","\\026",
"\\027","\\030","\\031","\\032","\\033","\\034","\\035","\\036","\\037",
"\\040","\\041","\\042","\\043","\\044","\\045","\\046","\\047","\\050",
"\\051","\\052","\\053","\\054","\\055","\\056","\\057","\\060","\\061",
"\\062","\\063","\\064","\\065","\\066","\\067","\\070","\\071","\\072",
"\\073","\\074","\\075","\\076","\\077","\\100","\\101","\\102","\\103",
"\\104","\\105","\\106","\\107","\\110","\\111","\\112","\\113","\\114",
"\\115","\\116","\\117","\\120","\\121","\\122","\\123","\\124","\\125",
"\\126","\\127","\\130","\\131","\\132","\\133","\\134","\\135","\\136",
"\\137","\\140","\\141","\\142","\\143","\\144","\\145","\\146","\\147",
"\\150","\\151","\\152","\\153","\\154","\\155","\\156","\\157","\\160",
"\\161","\\162","\\163","\\164","\\165","\\166","\\167","\\170","\\171",
"\\172","\\173","\\174","\\175","\\176","\\177","\\200","\\201","\\202",
"\\203","\\204","\\205","\\206","\\207","\\210","\\211","\\212","\\213",
"\\214","\\215","\\216","\\217","\\220","\\221","\\222","\\223","\\224",
"\\225","\\226","\\227","\\230","\\231","\\232","\\233","\\234","\\235",
"\\236","\\237","\\240","\\241","\\242","\\243","\\244","\\245","\\246",
"\\247","\\250","\\251","\\252","\\253","\\254","\\255","\\256","\\257",
"\\260","\\261","\\262","\\263","\\264","\\265","\\266","\\267","\\270",
"\\271","\\272","\\273","\\274","\\275","\\276","\\277","\\300","\\301",
"\\302","\\303","\\304","\\305","\\306","\\307","\\310","\\311","\\312",
"\\313","\\314","\\315","\\316","\\317","\\320","\\321","\\322","\\323",
"\\324","\\325","\\326","\\327","\\330","\\331","\\332","\\333","\\334",
"\\335","\\336","\\337","\\340","\\341","\\342","\\343","\\344","\\345",
"\\346","\\347","\\350","\\351","\\352","\\353","\\354","\\355","\\356",
"\\357","\\360","\\361","\\362","\\363","\\364","\\365","\\366","\\367",
"\\370","\\371","\\372","\\373","\\374","\\375","\\376","\\377"};
STRLEN len;
int i;
unsigned char * s;
SV* ret;
s = SvPV(a,len);
ret = newSV(4*len);
sv_setpv(ret, "");
for (i=0; i<len; i++,s++) {
sv_catpv(ret, cache[*s]);
};
return ret;
};
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Sat, 29 Jul 2006 00:24:10 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Efficiently convert characters to octal representation
Message-Id: <KUxyg.66326$B91.37004@edtnps82>
Worky Workerson wrote:
> I have a (possibly binary) string like "worky" where I'd like to
> convert each byte to its octal representation, resulting in a string
> "\167\157\162\153\171". I have two solutions, however I'm looking for
> any way that would be faster.
>
> Control:
> $content = 'worky';
> return $content;
>
> Solution 1 (in place w/regex):
> $content = 'worky';
> $content =~ s/(.|\n)/sprintf("\\%03o", ord $1)/eg;
> return $content
>
> Solution 2 (index into string):
> $content = 'worky';
> do {
> use bytes;
> foreach my $idx (0..(length($content)-1)) {
> $ret .= sprintf("\\%03o", ord(substr($content, $idx, 1)));
> }
> };
> return $ret;
>
> Based on a quick cmpthese benchmark, the control is about 16 times
> faster than solution 1 and about 9 times faster than solution 2.
>
> Does anyone know of A) The fastest way to do this or B) some
> tips/tricks on how to speedup my methods?
Create the translation table first:
my %table = map { chr, sprintf '\%03o', $_ } 0 .. 255;
$content =~ s/(.)/$table{$1}/sg;
foreach my $idx ( 0 .. length( $content ) - 1 ) {
$ret .= $table{ substr $content, $idx, 1 };
}
John
--
use Perl;
program
fulfillment
------------------------------
Date: Fri, 28 Jul 2006 22:10:35 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: Efficiently convert characters to octal representation
Message-Id: <b3bqp3-nd4.ln1@osiris.mauzo.dyndns.org>
Quoth "Worky Workerson" <worky.workerson@gmail.com>:
> Ben Morrow wrote:
> > [converting a string into octal esacpes]
>
> > However, I am hard-pressed to think of a situation where it's worth
> > writing anything other than 'regex' above, as clarity is almost always
> > more important than speed.
>
> I'm doing database ETL and transforming 300GB of CSV into something the
> database likes to load. According to DProf, this was my biggest
> slacker by far, partly because it is called so often. Every little bit
> of speed helps :)
Fair enough :). A lot of people seem to come here saying 'I want to do
<foo> really fast' without thinking whether that's really necessary.
> > Also note that the 'regex' solution would need a 'use bytes' to be
> > strictly compatible with the others. I'm not sure why you think you need
> > it: if you've read your data from a binmode :raw filehandle it's binary
> > anyway; otherwise you want to encode it with Encode into a suitable
> > encoding.
>
> I guess I'm still a little fuzzy on the whole perl/binary thing.
Yeah, it's kinda complicated. It's made harder by the fact that Perl has
to be backwards-compatible, so a lot of the time just fudging things
seems to work...
> I'm reading in CSV where most of the columns are ASCII but I'm not
> sure what sort of data will be stored in one of the columns. I am
> declaring binmode on the filehandle ... do I still need the 'use
> bytes' on the substr approach?
If you are reading from a binary filehandle, then the data is all 8bit
(as opposed to wider than that) anyway, so you don't. You may get a
slight speed benefit by declaring 'use bytes' at the top of the script.
--
For far more marvellous is the truth than any artists of the past imagined!
Why do the poets of the present not speak of it? What men are poets who can
speak of Jupiter if he were like a man, but if he is an immense spinning
sphere of methane and ammonia must be silent?~Feynmann~benmorrow@tiscali.co.uk
------------------------------
Date: Sat, 29 Jul 2006 04:02:29 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: Efficiently convert characters to octal representation
Message-Id: <5nvqp3-ndo.ln1@osiris.mauzo.dyndns.org>
Quoth xhoster@gmail.com:
> "Sisyphus" <sisyphus1@nomail.afraid.org> wrote:
> >
> > D:\pscrpt\inline\>perl char2octal.pl
> > Use of uninitialized value in subroutine entry at char2octal.pl line 22.
> > \141\142\143\144\101\102\103\104
> > -----------------------------
> >
> > I'm sure it's one of those questions that will make me go "Doh!", but I
> > can't for the life of me see what is causing that "uninitialized"
> > warning. Any hints ? (I'm running perl 5.8.8 on Win32.)
>
> Ah, I forgot to turn on warnings and so never saw it.
>
> Apparently sv_catpvf, unlike .= operator, doesn't care for undefined
> values. So make that:
>
> ret = newSV(4*len);
> sv_setpv(ret, "");
> for (i=0; i<len; i++,s++) {
>
> I guess Inline warnings all get reported as being at subroutine entry?
Yes, as with all warnings thrown inside XS. The currently executing Perl
op is the sub call, so that's what you get: the whole XS sub is run as
part of the sub call op, which then returns rather than jumping to the
start of the sub as it would with Perl.
> For what it's worth, I've made another uglier one that is about twice again
> as fast. This is going to wrap like crazy:
>
> SV* sol32(SV* a) {
> static const char * cache[]={"\\000","\\001","\\002","\\003","\\004",
I wondered about that (in Perl, not in C); to make it a little less ugly
you could have
static const char cache[0x100][5]; /* c arrays confuse me :( */
void populate_cache (void) {
int i;
for (i=0; i<0x100; i++) {
Copy(form("\\%3o", i), cache[i], 5, char);
}
}
Ben
--
Outside of a dog, a book is a man's best friend.
Inside of a dog, it's too dark to read.
benmorrow@tiscali.co.uk Groucho Marx
------------------------------
Date: Fri, 28 Jul 2006 22:56:26 GMT
From: axel@white-eagle.invalid.uk
Subject: Re: Improving performance of a simple Perl script
Message-Id: <uCwyg.7319$5K2.2297@fed1read03>
vfoley@gmail.com wrote:
> I wrote a little script in Perl to make stats on a log file. You can
> view the source at: http://pastebin.ca/104391 . When running on an
Why were you unable to post it here? Why should we go and visit your
website to look at your script... expecting more hits for averts
perhaps?
Axel
------------------------------
Date: Fri, 28 Jul 2006 23:34:30 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Improving performance of a simple Perl script
Message-Id: <aaxyg.66323$B91.37778@edtnps82>
vfoley@gmail.com wrote:
>
> I wrote a little script in Perl to make stats on a log file. You can
> view the source at: http://pastebin.ca/104391 . When running on an
> OpenBSD 3.9 machine (Pentium III 450 MHz, 128 MB RAM), with Perl 5.8.6,
> the script takes 35 seconds to crunch through a file with 175,000
> lines. Not bad. However, a Ruby script (http://pastebin.ca/104393)
> that I wrote a while ago does the same file in 23 seconds. As far as I
> know, the Perl interpreter is faster than Ruby, so I would be
> interested to know how I could improve the execution speed of the Perl
> script. I'm still very new, so I don't know all the idioms and such,
> so any help would be greatly appreciated.
7 sub mktime {
8 my ($day, $month_name, $year) = @_;
9 my %months = (
10 Jan => 0,
11 Feb => 1,
12 Mar => 2,
13 Apr => 3,
14 May => 4,
15 Jun => 5,
16 Jul => 6,
17 Aug => 7,
18 Sep => 8,
19 Oct => 9,
20 Nov => 10,
21 Dec => 11
22 );
23 return timelocal(0, 0, 0, $day, $months{$month_name}, $year);
24 }
You should declare and define the %months hash outside the subroutine so it
isn't assigned everytime the subroutine is called.
Date::Calc may be faster than Time::Local.
49 if (exists($counts{$date})) {
50 unless (grep { $ip eq $_ } @{$counts{$date}}) {
51 push(@{$counts{$date}}, $ip);
52 }
53 } else {
54 $counts{$date} = [];
55 }
Using a Hash of Hashes would be faster than grepping through an array for
every $ip and perl autovivifies so the test for exists() is superfluous.
60 printf "%s\t%d\n", strftime("%d-%b-%Y", 0, 0, 0, $day, $month, $year),
61 scalar(@{$counts{$key}});
print() is safer and faster than printf() and you don't need printf() anyway.
John
--
use Perl;
program
fulfillment
------------------------------
Date: 28 Jul 2006 19:09:16 -0700
From: vfoley@gmail.com
Subject: Re: Improving performance of a simple Perl script
Message-Id: <1154138956.050944.7480@i3g2000cwc.googlegroups.com>
Thank you for your suggestions, John. Using a hash of hashes really
improved the performance, I went from 35-36 seconds to 6 seconds, a 6x
improvement. Thank you again!
------------------------------
Date: Sat, 29 Jul 2006 05:46:17 GMT
From: Charles DeRykus <ced@blv-sam-01.ca.boeing.com>
Subject: Re: libwww-POST Issue
Message-Id: <J35HD2.32u@news.boeing.com>
AZSTYX wrote:
> AZSTYX wrote:
> ...
> RESOLVED!!
> When using this method, code form varaibles in ->content().
> Do not use $httpReq-> content_type('multipart/form-data') ; that is
> only for uploading files.
> For post do not inlcue variables in URL.
> New code that works:
> [code]
> $url=dynamic/File/Configuration/ReceivefromDevice
> $httpReq = HTTP::Request->new(POST=>$url) ; # init Request object
> $httpReq->content('DownloadFormat=ascii'); # pass form variables
> $httpReq-> authorization_basic($UID, $upassw) ; # credentials
> $httpResp = $ua->request($httpReq) ;
>
>
Another simpler alternative which'll output the correct header; take
care of form encoding; and also output a content-length header (needed
for https POST requests IIRC):
use LWP;
use HTTP::Request::Common qw/POST/;
...
my $r = POST $url, [Comment => 'justacomment'];
$r->authorization_basic($UID, $upassw);
print $r->as_string;
sample output:
POST https://130.130.130.130:23?DownloadFormat=ascii
Authorization: Basic Y2VkOnJ1bndheS0x
Content-Length: 20
Content-Type: application/x-www-form-urlencoded
Comment=justacomment
--
Charles DeRykus
------------------------------
Date: Sat, 29 Jul 2006 04:42:33 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Jul 29 2006
Message-Id: <J35EEx.17zD@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.
AIX-Perfstat-0.03
http://search.cpan.org/~aciddeath/AIX-Perfstat-0.03/
Perl wrapper for perfstat() functions.
----
Acme-MorningMusume-0.06
http://search.cpan.org/~kentaro/Acme-MorningMusume-0.06/
All about Japanese pop star "Morning Musume"
----
Email-Send-2.17
http://search.cpan.org/~rjbs/Email-Send-2.17/
Simply Sending Email
----
Email-Simple-1.96
http://search.cpan.org/~rjbs/Email-Simple-1.96/
Simple parsing of RFC2822 message format and headers
----
Error-0.17001
http://search.cpan.org/~shlomif/Error-0.17001/
Error/exception handling in an OO-ish way
----
JavaScript-SpiderMonkey-0.17
http://search.cpan.org/~tbusch/JavaScript-SpiderMonkey-0.17/
Perl interface to the JavaScript Engine
----
Jifty-DBI-Record-AutoIncremented-0.01
http://search.cpan.org/~erwan/Jifty-DBI-Record-AutoIncremented-0.01/
Autoincrement the id field of a Jifty::DBI::Record
----
Locale-Maketext-Utils-v0.0.4
http://search.cpan.org/~dmuey/Locale-Maketext-Utils-v0.0.4/
Adds some utility functionality and failure handling to Local::Maketext handles
----
Net-UCP-0.24
http://search.cpan.org/~nemux/Net-UCP-0.24/
Perl extension for EMI - UCP Protocol.
----
Net-UCP-0.25
http://search.cpan.org/~nemux/Net-UCP-0.25/
Perl extension for EMI - UCP Protocol.
----
Net-VNC-0.35
http://search.cpan.org/~lbrocard/Net-VNC-0.35/
A simple VNC client
----
Object-Relation-v0.1.0
http://search.cpan.org/~dwheeler/Object-Relation-v0.1.0/
Advanced Object Relational Mapper
----
PAR-Dist-0.15
http://search.cpan.org/~smueller/PAR-Dist-0.15/
Create and manipulate PAR distributions
----
Term-Menus-1.15
http://search.cpan.org/~reedfish/Term-Menus-1.15/
Create Powerful Terminal, Console and CMD Enviroment Menus
----
WWW-Blog-Metadata-AccountAutoDiscovery-0.02
http://search.cpan.org/~kentaro/WWW-Blog-Metadata-AccountAutoDiscovery-0.02/
Extract online accounts from blogs
----
WWW-Search-MSN-0.0103
http://search.cpan.org/~shlomif/WWW-Search-MSN-0.0103/
backend for searching search.msn.com
----
WebSphere-MQTT-Client-0.02
http://search.cpan.org/~njh/WebSphere-MQTT-Client-0.02/
WebSphere MQ Telemetry Transport Client
----
srm-1.0.1
http://search.cpan.org/~foolfish/srm-1.0.1/
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: Sat, 29 Jul 2006 07:01:43 +0100
From: "IanW" <whoami@whereami.net>
Subject: Re: Perl 6
Message-Id: <qMqdnRAn5MxaZFfZRVnyuQ@pipex.net>
"DJ Stunks" <DJStunks@gmail.com> wrote in message
news:1154016134.922742.100330@i42g2000cwa.googlegroups.com...
>
> IanW wrote:
>> How is this progressing - anyone know when it's due to be released?
>
> you can watch this blog http://pugs.blogs.com/pugs/
>
> or this feed http://planetsix.perl.org/rss20.xml
ok thanks.. sounds pretty exciting!
------------------------------
Date: Sat, 29 Jul 2006 00:23:32 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Problem with perl script and form
Message-Id: <4ivh57F5ca2cU1@individual.net>
Songhw@gmail.com wrote:
> Can someone tell me the steps I have to follow to run my program ?
You may find this page useful: http://my.execpc.com/~keithp/bdlogcgi.htm
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Fri, 28 Jul 2006 23:06:38 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: same code diff result
Message-Id: <2Mwyg.144397$I61.46097@clgrps13>
Amaninder wrote:
>
> I tried lot of things but can not able to figure out why the same code
> in for loop is giving me different results.
> Code 1 is giving me the correct result but Code 2 does NOT. All i am
> doing in ths Code 1 is that i have
> my $got = "3 500 1660 17800 19360 N";
> my $exp = "<0 3> <0 500> <0 1660> 17800 19360 <0
> N>";
>
> and i am filling @btw with ('"0 3". "3", "0 500", "500", "0 N" ,
> "N").
I get the same results as your program using this:
$ perl -le'
my $exp = "<0 3> <0 500> <0 1660> 17800 19360 <0 N>";
my @btw = $exp =~ /<(\S.*?(\S+))>/g;
print for @btw;
'
0 3
3
0 500
500
0 1660
1660
0 N
N
You probably need to simplify your code.
John
--
use Perl;
program
fulfillment
------------------------------
Date: Sat, 29 Jul 2006 11:45:56 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Strange characters using Term::Readline on Win32
Message-Id: <44cabec4$0$24357$afc38c87@news.optusnet.com.au>
"Wolfram Humann" <w.n.humann@agilent.com> wrote in message
news:1154091485.664297@newsreg.cos.agilent.com...
> Hope this is not too much a DOS/Windows question to be answered here...
>
> I'm getting strange characters (escape sequences???) at the prompt and
when typing characters using
> Term::ReadLine. As an example I type 'ABCD' followed by the return key at
the prompt generated by
> this line:
>
> perl -M"Term::ReadLine" -e"Term::ReadLine->new('')->readline('PROMPT')"
>
> and what I get is this:
>
> ?[4;mPROMPT?[1mA?[0m?[1mB?[0m?[1mC?[0m?[1mD?[0m
>
Yes, they look like ANSI escape sequences to me.
I, too, cannot reproduce the behaviour (on Windows 2000) with any of the
perls/shells that I have. Which shell are you running in - the cmd.exe
shell, or the command.com shell, or some other shell ?
Is there something you've installed/enabled that could be doing this ?
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 V10 Issue 9536
***************************************