[29857] in Perl-Users-Digest
Perl-Users Digest, Issue: 1100 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Dec 9 03:09:45 2007
Date: Sun, 9 Dec 2007 00:09:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 9 Dec 2007 Volume: 11 Number: 1100
Today's topics:
Re: "use constant X=>(1,2);" or "use constant X=>[1,2]; <tadmc@seesig.invalid>
Re: FAQ 4.63 How do I reset an each() operation part-wa xhoster@gmail.com
Re: FAQ 4.63 How do I reset an each() operation part-wa <xueweizhong@gmail.com>
Re: FAQ 4.63 How do I reset an each() operation part-wa <ced@blv-sam-01.ca.boeing.com>
Re: How can I print a number larger than 128? QoS@domain.invalid
Re: How can I print a number larger than 128? <m@rtij.nl.invlalid>
Re: How can I print a number larger than 128? <john@castleamber.com>
Re: How to make thumbnail image from web page? <hjp-usenet2@hjp.at>
Re: How to parse out specific data in text files and pl cyrusgreats@gmail.com
Re: How to parse out specific data in text files and pl cyrusgreats@gmail.com
Re: How to parse out specific data in text files and pl <ben@morrow.me.uk>
Re: Multi phase processing <daves@orpheusmail.co.uk>
Re: Multi phase processing <daves@orpheusmail.co.uk>
Re: Multi phase processing <daves@orpheusmail.co.uk>
Re: Multi phase processing <john@castleamber.com>
new CPAN modules on Sun Dec 9 2007 (Randal Schwartz)
Re: Problem in LDAP authentication <No_4@dsl.pipex.com>
Re: Questions about the operator \(...) xhoster@gmail.com
Re: Questions about the operator \(...) <xueweizhong@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 8 Dec 2007 13:21:10 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: "use constant X=>(1,2);" or "use constant X=>[1,2];"?
Message-Id: <slrnfllrl6.f54.tadmc@tadmc30.sbcglobal.net>
Victor Porton <porton@narod.ru> wrote:
> What's better?
>
> use constant X=>(1,2);
>
> or
>
> use constant X=>[1,2];
They do not do the same thing.
So then the question becomes which of those 2 things is the one
that you want to do?
Use whichever that one is.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: 09 Dec 2007 00:47:09 GMT
From: xhoster@gmail.com
Subject: Re: FAQ 4.63 How do I reset an each() operation part-way through?
Message-Id: <20071208194712.868$64@newsreader.com>
Todd <xueweizhong@gmail.com> wrote:
> > 4.63: How do I reset an each() operation part-way through?
> >
> > Using "keys %hash" in scalar context returns the number of keys in
> > the hash *and* resets the iterator associated with the hash. You
> > may need to do this if you use "last" to exit a loop early so that
> > when you re-enter it, the hash iterator has been reset.
>
> The code will be strange even it works. Is there a explicit way to do
> this?
>
> Look at this snip:
>
> #! /bin/perl -l
>
> %hash = (1=>a,2=>b,10000=>aaa);
>
> #find if there is an big key
> while (($key,$value) = each %hash) {
> if ($key > 1000) {
> print "$key => $value";
> keys %hash; # what will people think about the intention of this
> line?
> last;
> }
> }
With the comment, I assume people will think that the intention of that
line is to be part of some academic quiz. Without the comment, the people
who are likely to pass such a quiz are likely to know what the intention
is.
What do you think people will think the intention of this line is?
keys %hash; # reset iterator
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
------------------------------
Date: Sat, 8 Dec 2007 21:35:05 -0800 (PST)
From: Todd <xueweizhong@gmail.com>
Subject: Re: FAQ 4.63 How do I reset an each() operation part-way through?
Message-Id: <97380f86-8786-4d5c-b4e3-448cbdb9dec8@t1g2000pra.googlegroups.com>
Maybe the below one is the best choice, give it a named function:
#! /bin/perl -l
sub rhi(%) { keys %{shift} }
%hash = (a=>1, b=>2);
print join '=>', each %hash;
rhi %hash;
print join '=>', each %hash;
__END__
a=>1
a=>1
-Todd
------------------------------
Date: Sat, 8 Dec 2007 22:02:26 -0800 (PST)
From: "comp.llang.perl.moderated" <ced@blv-sam-01.ca.boeing.com>
Subject: Re: FAQ 4.63 How do I reset an each() operation part-way through?
Message-Id: <1f18623d-46f1-4153-ae86-6133b0f31640@i12g2000prf.googlegroups.com>
On Dec 8, 9:35 pm, Todd <xueweizh...@gmail.com> wrote:
> Maybe the below one is the best choice, give it a named function:
>
> #! /bin/perl -l
>
> sub rhi(%) { keys %{shift} }
>
> %hash = (a=>1, b=>2);
> print join '=>', each %hash;
> rhi %hash;
> print join '=>', each %hash;
>
> __END__
> a=>1
> a=>1
But the sub just moves the idiom out of the line
of sight. Even the sub name is cryptic unless you can guess what the
shorthand "rhi" stands for... but then you'd likely know something
about iterators and how they work. A simple inline comment is a
clearer, more direct reminder of
the idiom IMO.
--
Charles DeRykus
------------------------------
Date: Sat, 08 Dec 2007 19:33:41 GMT
From: QoS@domain.invalid
Subject: Re: How can I print a number larger than 128?
Message-Id: <pkC6j.10305$OR.7977@trnddc01>
spambait@milmac.com (Doug Miller) wrote in message-id: <6bA6j.5046$fl7.3162@newssvr22.news.prodigy.net>
>
> In article <Jzy6j.1032$bW.927@trnddc07>, QoS@domain.invalid wrote:
> >
> >kun niu <haoniukun@gmail.com> wrote in message-id:
> > <23f658ee-76ed-4d2f-b77c-de62ade9bcae@d27g2000prf.googlegroups.com>
> >
> >>
> >> Dear all,
> >> I'm new here.
> >> I've got a number larger than 128.
> >> I want to send it by socket.
> >> I find that if print the number directly, I'll print the number in
> >> ascii format.
> >> So I'll have 3 separate numbers transmitted.
> >> But I only want to transmit one byte.
> >> How can I do so?
> >>
> >> Thanks for any help.
> >
> >You can try developing a compression algo or else use one off the shelf.
>
> Why would that be necessary?
>
> >Something that reduces the need for consecutive zeros or ones.
>
> Why would that be necessary?
>
> >The one byte constraint is more than a bit limiting though.
>
> Huh? One byte = 8 bits, which can hold values up to 2^8 - 1 = 255. All he
> needs to do is send it in binary.
>
cause the OP says that he wishes to send _only one byte_
------------------------------
Date: Sat, 8 Dec 2007 21:33:20 +0100
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: How can I print a number larger than 128?
Message-Id: <pan.2007.12.08.20.33.19@rtij.nl.invlalid>
On Sat, 08 Dec 2007 19:33:41 +0000, QoS wrote:
> spambait@milmac.com (Doug Miller) wrote in message-id:
> <6bA6j.5046$fl7.3162@newssvr22.news.prodigy.net>
>
>
>> In article <Jzy6j.1032$bW.927@trnddc07>, QoS@domain.invalid wrote:
>> >
>> >kun niu <haoniukun@gmail.com> wrote in message-id:
>> > <23f658ee-76ed-4d2f-b77c-de62ade9bcae@d27g2000prf.googlegroups.com>
>> >
>> >
>> >> Dear all,
>> >> I'm new here.
>> >> I've got a number larger than 128.
>> >> I want to send it by socket.
>> >> I find that if print the number directly, I'll print the number in
>> >> ascii format.
>> >> So I'll have 3 separate numbers transmitted. But I only want to
>> >> transmit one byte. How can I do so?
>> >>
>> >> Thanks for any help.
>> >
>> >You can try developing a compression algo or else use one off the
>> >shelf.
>>
>> Why would that be necessary?
>>
>> >Something that reduces the need for consecutive zeros or ones.
>>
>> Why would that be necessary?
>>
>> >The one byte constraint is more than a bit limiting though.
>>
>> Huh? One byte = 8 bits, which can hold values up to 2^8 - 1 = 255. All
>> he needs to do is send it in binary.
>>
>>
> cause the OP says that he wishes to send _only one byte_
So? 128 is binary 10000000 which fits nicely in one byte.
M4
------------------------------
Date: 8 Dec 2007 21:27:07 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: How can I print a number larger than 128?
Message-Id: <Xns9A009D30C76A9castleamber@130.133.1.4>
Martijn Lievaart <m@rtij.nl.invlalid> wrote:
> So? 128 is binary 10000000 which fits nicely in one byte.
128 is not larger than 128, so that's not the problem.
Anyway, up to (and including) 255 fits in one byte. If the OP needs to fit
all numbers in [0..max] with max > 255 in a single byte the OP has a
problem :-). If the number of numbers is limited to max 256 different
ones, it's possible to encode each in a byte.
--
John
http://johnbokma.com/
------------------------------
Date: Sat, 8 Dec 2007 21:51:13 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: How to make thumbnail image from web page?
Message-Id: <slrnflm0u1.ip6.hjp-usenet2@hrunkner.hjp.at>
On 2007-12-08 12:44, A. Sinan Unur <1usa@llenroc.ude.invalid> wrote:
> "Peter J. Holzer" <hjp-usenet2@hjp.at> wrote in
> news:slrnflktf3.km.hjp-usenet2@hrunkner.hjp.at:
>
>> On 2007-12-06 10:15, Michele Dondi <bik.mido@tiscalinet.it> wrote:
>>> On Thu, 6 Dec 2007 00:38:52 +0100, "Peter J. Holzer"
>>><hjp-usenet2@hjp.at> wrote:
>>>>> Render, then subsample.
>>>> ^^^^^^
>>>> That's the interesting part. How do you render a web-page into a
>>>>pixmap? Subsampling is trivial.
[...]
>>> or (ii) launch a browser and take a screenshot. IIRC both actions can
>>> be automated in perl.
>>
>> This limits you to the size of the browser window. Which is probably
>> what you want for a thumbnail, but I was thinking in a more general
>> way (sorry for not mentioning the shift in focus).
>
> There is a plugin for Firefox called Screengrab which I use. It is able
> to take a snapshot of the entire contents of the browser window (not the
> window decorations, though).
Ah, that's a nice one. Didn't know that.
hp
------------------------------
Date: Sat, 8 Dec 2007 20:02:38 -0800 (PST)
From: cyrusgreats@gmail.com
Subject: Re: How to parse out specific data in text files and plugs into the spreadsheet
Message-Id: <a90cd845-0783-4b3a-82a8-4f8d1b5ffeb1@t1g2000pra.googlegroups.com>
On Dec 8, 12:21 pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth "Dr.Ruud" <rvtol+n...@isolution.nl>:
>
> > cyrusgre...@gmail.com schreef:
> > > Ben Morrow:
>
> > >> my ($k, $v) = /([^:]*) \s* : \s* (.*)/x
> > >> or die "invalid field: '$_'";
>
> > > I'm getting error: invalid field in this line:
> > > my ($k, $v) = /([^:]*) \s* : \s* (.*)/x
> > > or die "invalid field: '$_'";
>
> > Maybe you understand it better if you change the code line to:
>
> > my ($k, $v) = /([^:]*) \s* : \s* (.*)/x
> > or die "bad data: invalid field '$_' in chunk $.";
>
> die includes $. in the message anyway.
>
> Ben
Any of you guys can help me on the below then I close my case. I want
to match the following but seems does not work the way I want it:
RDF Throughput R1->R2 (IO/s) : 1609
RDF Throughput R1->R2 (MB/s) : 19.4
$match1 =~/RDF Throughput R1->R2 \(MB\/s\)\/;
$match2 =~/RDF Throughput R1->R2 \(IO\/s\)\/;
------------------------------
Date: Sat, 8 Dec 2007 21:21:53 -0800 (PST)
From: cyrusgreats@gmail.com
Subject: Re: How to parse out specific data in text files and plugs into the spreadsheet
Message-Id: <453f621b-1a5c-45ac-831f-e251d49a741f@d21g2000prf.googlegroups.com>
On Dec 8, 8:02 pm, cyrusgre...@gmail.com wrote:
> On Dec 8, 12:21 pm, Ben Morrow <b...@morrow.me.uk> wrote:
>
>
>
> > Quoth "Dr.Ruud" <rvtol+n...@isolution.nl>:
>
> > > cyrusgre...@gmail.com schreef:
> > > > Ben Morrow:
>
> > > >> my ($k, $v) = /([^:]*) \s* : \s* (.*)/x
> > > >> or die "invalid field: '$_'";
>
> > > > I'm getting error: invalid field in this line:
> > > > my ($k, $v) = /([^:]*) \s* : \s* (.*)/x
> > > > or die "invalid field: '$_'";
>
> > > Maybe you understand it better if you change the code line to:
>
> > > my ($k, $v) = /([^:]*) \s* : \s* (.*)/x
> > > or die "bad data: invalid field '$_' in chunk $.";
>
> > die includes $. in the message anyway.
>
> > Ben
>
> Any of you guys can help me on the below then I close my case. I want
> to match the following but seems does not work the way I want it:
>
> RDF Throughput R1->R2 (IO/s) : 1609
> RDF Throughput R1->R2 (MB/s) : 19.4
>
> $match1 =~/RDF Throughput R1->R2 \(MB\/s\)\/;
> $match2 =~/RDF Throughput R1->R2 \(IO\/s\)\/;- Hide quoted text -
>
> - Show quoted text -
I figured that out thanks all for your time/help, I used the
following:
\\ (MB\/s\\)
------------------------------
Date: Sat, 8 Dec 2007 20:21:44 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: How to parse out specific data in text files and plugs into the spreadsheet
Message-Id: <ovar25-km3.ln1@osiris.mauzo.dyndns.org>
Quoth "Dr.Ruud" <rvtol+news@isolution.nl>:
> cyrusgreats@gmail.com schreef:
> > Ben Morrow:
>
> >> my ($k, $v) = /([^:]*) \s* : \s* (.*)/x
> >> or die "invalid field: '$_'";
> >
> > I'm getting error: invalid field in this line:
> > my ($k, $v) = /([^:]*) \s* : \s* (.*)/x
> > or die "invalid field: '$_'";
>
> Maybe you understand it better if you change the code line to:
>
> my ($k, $v) = /([^:]*) \s* : \s* (.*)/x
> or die "bad data: invalid field '$_' in chunk $.";
die includes $. in the message anyway.
Ben
------------------------------
Date: Sun, 09 Dec 2007 01:24:59 +0000 (GMT)
From: Dave Stratford <daves@orpheusmail.co.uk>
Subject: Re: Multi phase processing
Message-Id: <4f4e3ff219daves@orpheusmail.co.uk>
In article <47583f33$0$16573$9b4e6d93@newsspool1.arcor-online.net>,
Christian Winter <thepoet_nospam@arcor.de> wrote:
> An intuitive approach is the CGI::Session module, which already
> comes with a mysql backend. Its use is quite similar to the
> CGI module itself, so the learning curve isn't steep, and a
> tutorial is also included. Even more concise in its usage is
> Apache::Session, which lets you tie() your session storage to
> a hash.
Okay thanks, I'll have a look at these. I know I'll be able to install
the, on my own dev server, but I may not have that luxurie on the live
server.
Dave
--
Dave Stratford ZFCA
http://daves.orpheusweb.co.uk/
Hexagon Systems Limited - Experts in VME systems development
------------------------------
Date: Sun, 09 Dec 2007 01:29:22 +0000 (GMT)
From: Dave Stratford <daves@orpheusmail.co.uk>
Subject: Re: Multi phase processing
Message-Id: <4f4e405834daves@orpheusmail.co.uk>
In article <20071206214639.025$PS@newsreader.com>,
<xhoster@gmail.com> wrote:
> Tad McClellan <tadmc@seesig.invalid> wrote:
> > Dave <daves@orpheusmail.co.uk> wrote:
> >
> > > Since Apache is stateless, all the data input from previous
> > > pages has to be put back into the next page in the form of hidden
> > ^^^^^^
> > ^^^^^^
> > No it doesn't.
> >
> > > input tags, and then read back in each time.
> >
> > Passing via hidden fields is but 1 of 3 "usual" ways of managing state,
> > and it is generally the worst of the three.
> >
> > The 3 usual ways, in order of "best to worst" are:
> >
> > store info on server and pass only a session ID around
> >
> > store info in cookies
> >
> > store info in hidden fields
> Why are cookies better than hidden fields? I usually find hidden fields
> much better than cookies. In fact, I often find them better than
> sessions. It doesn't really require any extra flap-doodle, as I need to
> collect and validate the data in the first place, I can use the same
> code to do it again out of the hidden field. I don't need to install
> some special module to keep state and then maintain and configure it.
> If the server crashes momentarily, the user hasn't lost their state. I
> don't have to decide how long to maintain state for people who are
> taking a long time to finish all the steps of the task.
In my case I'm not allowed to use cookies, and I'm not allowed to save the
data to the server as this causes 'holes' in the data if someone abandons
part way through, so I'm having to use hidden fields.
My problem is that part of the data is dynamically generated, and I
cannot, currently, see an obvious way to drop it into hidden fields. (Or
for that matter cookies!)
If I was allowed to store it on the server it wouldn't be a problem, (End
users for you!)
Dave
--
Dave Stratford ZFCA
http://daves.orpheusweb.co.uk/
Hexagon Systems Limited - Experts in VME systems development
------------------------------
Date: Sun, 09 Dec 2007 01:34:30 +0000 (GMT)
From: Dave Stratford <daves@orpheusmail.co.uk>
Subject: Re: Multi phase processing
Message-Id: <4f4e40d0eadaves@orpheusmail.co.uk>
In article <20071206213226.480$d4@newsreader.com>,
<xhoster@gmail.com> wrote:
> I don't understand the problem. You should be able to stuff it back
> into hidden tags exactly the same way you get it out of the original
> submission. For example, if all the checkbox names start with
> "lang_exp", like "lang_exp_C_VME", "lang_exp_Perl_Linux", then something
> like:
> print $q->hidden($_) foreach grep /^lang_exp/, $q->param();
I use HTML::Template rather than use cgi directly, so I'm not sure. I
agree it aught to be possible but I'm getting myself well and truly
confused over this. Plus I'm not entirely sure what the above line does.
I'll get the book(s) out and have a good read tomorrow!
> Should work, right?
Um! Er?
Thanks,
Dave
--
Dave Stratford ZFCA
http://daves.orpheusweb.co.uk/
Hexagon Systems Limited - Experts in VME systems development
------------------------------
Date: 9 Dec 2007 03:52:47 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Multi phase processing
Message-Id: <Xns9A00DE941A88Bcastleamber@130.133.1.4>
Dave Stratford <daves@orpheusmail.co.uk> wrote:
> Okay thanks, I'll have a look at these. I know I'll be able to install
> the, on my own dev server, but I may not have that luxurie on the live
> server.
If you have a shell account, you always can install Perl modules in a
different directory. If you haven't, you might be able to write a CGI
script that installs a Perl module in a directory you've access to ;-)
--
John
Arachnids near Coyolillo - part 1
http://johnbokma.com/mexit/2006/05/04/arachnids-coyolillo-1.html
------------------------------
Date: Sun, 9 Dec 2007 05:42:14 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sun Dec 9 2007
Message-Id: <Jsrp6E.1xvr@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.
Alien-Prototype-1.6.0.1
http://search.cpan.org/~gtermars/Alien-Prototype-1.6.0.1/
installing and finding Prototype JS library
----
Alien-scriptaculous-1.8.0.1
http://search.cpan.org/~gtermars/Alien-scriptaculous-1.8.0.1/
installing and finding script.aculo.us
----
Audio-M4P-0.40
http://search.cpan.org/~billh/Audio-M4P-0.40/
Perl QuickTime / MP4 / iTunes Music Store audio / video file tools
----
Audio-M4P-0.41
http://search.cpan.org/~billh/Audio-M4P-0.41/
Perl QuickTime / MP4 / iTunes Music Store audio / video file tools
----
CFPlus-0.9958
http://search.cpan.org/~mlehmann/CFPlus-0.9958/
undocumented utility garbage for our crossfire client
----
CFPlus-0.9959
http://search.cpan.org/~mlehmann/CFPlus-0.9959/
undocumented utility garbage for our crossfire client
----
Catalyst-Authentication-Store-FromSub-Hash-0.02
http://search.cpan.org/~fayland/Catalyst-Authentication-Store-FromSub-Hash-0.02/
A storage class for Catalyst Authentication using one Catalyst Model class (hash returned)
----
Catalyst-Controller-Atompub-0.3.0
http://search.cpan.org/~takeru/Catalyst-Controller-Atompub-0.3.0/
A Catalyst controller for the Atom Publishing Protocol
----
Catalyst-Model-Estraier-0.0.1
http://search.cpan.org/~takeru/Catalyst-Model-Estraier-0.0.1/
Hyper Estraier model class for Catalyst
----
Catalyst-Model-Estraier-0.0.2
http://search.cpan.org/~takeru/Catalyst-Model-Estraier-0.0.2/
Hyper Estraier model class for Catalyst
----
Config-Hierarchical-0.1
http://search.cpan.org/~nkh/Config-Hierarchical-0.1/
Hierarchical configuration container
----
Config-Options-0.04
http://search.cpan.org/~ealleniii/Config-Options-0.04/
Module to provide a configuration hash with option to read from file.
----
Convert-Binary-C-0.69_01
http://search.cpan.org/~mhx/Convert-Binary-C-0.69_01/
Binary Data Conversion using C Types
----
Devel-Mallinfo-1
http://search.cpan.org/~kryde/Devel-Mallinfo-1/
mallinfo() memory statistics
----
EV-1.72
http://search.cpan.org/~mlehmann/EV-1.72/
perl interface to libev, a high performance full-featured event loop
----
EV-Glib-0.1
http://search.cpan.org/~mlehmann/EV-Glib-0.1/
Embed the glib main loop into EV
----
Eval-Context-0.04
http://search.cpan.org/~nkh/Eval-Context-0.04/
Evalute perl code in context wraper
----
Find-Lib-0.02
http://search.cpan.org/~yannk/Find-Lib-0.02/
Helper to find libs to use in the filesystem tree
----
HTML-Tested-JavaScript-0.08
http://search.cpan.org/~bosu/HTML-Tested-JavaScript-0.08/
JavaScript enabled HTML::Tested widgets.
----
HTTP-SimpleLinkChecker-1.15
http://search.cpan.org/~bdfoy/HTTP-SimpleLinkChecker-1.15/
Check the HTTP response code for a link
----
JSON-1.99_02
http://search.cpan.org/~makamaka/JSON-1.99_02/
JSON (JavaScript Object Notation) encoder/decoder
----
Lingua-JA-Kana-0.01
http://search.cpan.org/~dankogai/Lingua-JA-Kana-0.01/
Kata-Romaji related utilities
----
Lingua-JA-Kana-0.02
http://search.cpan.org/~dankogai/Lingua-JA-Kana-0.02/
Kata-Romaji related utilities
----
Net-SFTP-Foreign-1.32
http://search.cpan.org/~salva/Net-SFTP-Foreign-1.32/
Secure File Transfer Protocol client
----
Template-Plugin-DumbQuotes-0.01
http://search.cpan.org/~yannk/Template-Plugin-DumbQuotes-0.01/
Transform educated quotes to dumb quotes
----
Test-AutoBuild-1.2.1
http://search.cpan.org/~danberr/Test-AutoBuild-1.2.1/
Automated build engine controller
----
Text-Phonetic-1.00
http://search.cpan.org/~maros/Text-Phonetic-1.00/
A module implementing various phonetic algorithm
----
WWW-MobileCarrierJP-0.04
http://search.cpan.org/~tokuhirom/WWW-MobileCarrierJP-0.04/
scrape mobile carrier information
----
text_hunspell_1.2
http://search.cpan.org/~eleonora/text_hunspell_1.2/
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, 08 Dec 2007 23:53:03 +0000
From: Big and Blue <No_4@dsl.pipex.com>
Subject: Re: Problem in LDAP authentication
Message-Id: <7NSdnQ4U3KP9s8banZ2dnUVZ8vmdnZ2d@pipex.net>
Praki wrote:
> Greetings All,
>
> I m trying to authenticate the user for my web page using the ldap
> server.i m able to get the info using user name. but i m not able to
> authenticate the password. here is the below code i m using.even if i
> give the wrong password it access the ldap server.i m not able to
> authenticate the user with their password. i tried in all ways.
> ....
> i m using Sun OS and Perl 5. can anyone tell me where i m going
> wrong...
Looks like you haven't fathomed LDAP...
You don't say whence $userid comes, but my suspicion is that this is
just the id you get in CGI's REMOTE_USER setting?
To valid date with LDAP:
a) Open an *anonymous* connexion
b) search() for the given id with a relevant base (so probably the
ou=active,ou=employees,ou=people,o=abc.com" you mention)
c) check that you get one, and only one, result from b) and get the dn
(distinguished name)
d) bind using the dn and the given password
e) check whether d) succeeds
If your LDAP server doesn't allow anonymous connexions then a) needs to be
done using a known (to you) LDAP dn + password (so not allowing anon
connexions is a bit silly, since you'd need to supply all clienst with an
known id/pwd anyway).
--
Just because I've written it doesn't mean that
either you or I have to believe it.
------------------------------
Date: 09 Dec 2007 00:38:02 GMT
From: xhoster@gmail.com
Subject: Re: Questions about the operator \(...)
Message-Id: <20071208193805.329$BR@newsreader.com>
Todd <xueweizhong@gmail.com> wrote:
> Hi perl guys,
>
> See the results below, what confused me most is difference between the
> "case3" and "case4":
>
> #! /bin/perl -l
>
> @a = (aa, bb, cc);
> sub foo {@a}
>
> print "case1: ", \foo;
> print "case2: ", \@a;
> print "case3: ", \(@a);
> print "case4: ", \(@a, 1);
>
> __END__
> case1: SCALAR(0x10410e54)SCALAR(0x1042ec3c)SCALAR(0x1042ec48)
> case2: ARRAY(0x1042eae0)
> case3: SCALAR(0x10410f38)SCALAR(0x1042eab0)SCALAR(0x1042ec0c)
> case4: ARRAY(0x1042eae0)SCALAR(0x1042ec3c)
>
> From the results shown above, I get:
>
> \(@a) is not (\@a), since the results are 3 references
> \(@a, 1) is (\@a, \1), since the results are 2 references.
>
> What's the reason to causes this differences?
My guess is that they wanted to provide an easy way to get a list of
references to each element of an array, so decided to make \(@foo) do that.
> I knew there must be some posts where this topics already has been
> thoroughly talked, but i can't google it. So may you give me some
> hints about this tricky thing?
perldoc perlref
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
------------------------------
Date: Sat, 8 Dec 2007 22:03:36 -0800 (PST)
From: Todd <xueweizhong@gmail.com>
Subject: Re: Questions about the operator \(...)
Message-Id: <9f714cd3-36c0-4878-bdd8-6318d8f15cf1@t1g2000pra.googlegroups.com>
> perldoc perlref
I don't think perlref have the explanation about this.
Let me make my example clearer:
#! /bin/perl -l
@a = (aa, bb, cc);
sub foo {@a}
print '\\@a: ', \@a;
print '\\(@a): ', \(@a);
print '\\(@a,1): ', \(@a, 1);
print;
print '\\foo: ', \foo;
print '\\(foo): ', \(foo);
print '\\(foo,1):', \(foo, 1);
__END__
\@a: ARRAY(0x1042eae0)
\(@a): SCALAR(0x10410f38)SCALAR(0x1042eab0)SCALAR(0x1042ec48)
\(@a,1): ARRAY(0x1042eae0)SCALAR(0x1042ec78)
\foo: SCALAR(0x10410e54)SCALAR(0x1042ec84)SCALAR(0x1042ec78)
\(foo): SCALAR(0x10410e54)SCALAR(0x1042ec84)SCALAR(0x1042ec78)
\(foo,
1):SCALAR(0x10410e54)SCALAR(0x1042ec84)SCALAR(0x1042ec78)SCALAR(0x1042ecb4)
From the results, I see that \@a and \(@a,1) are the different from
others. So i do think it's defined by syntax sugar for some special
usages. We can only treat them as syntax ruls, there are no expression
meaning here.
Finally, i just them like the "special form" case of lisp language.
-Todd
------------------------------
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 1100
***************************************