[29617] in Perl-Users-Digest
Perl-Users Digest, Issue: 861 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 18 06:09:40 2007
Date: Tue, 18 Sep 2007 03:09:07 -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 Tue, 18 Sep 2007 Volume: 11 Number: 861
Today's topics:
Re: $string =~ /$pattern/i <tadmc@seesig.invalid>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <tadmc@seesig.invalid>
Re: Challenge: CPU-optimized byte-wise or-equals (for a <tadmc@seesig.invalid>
Re: Challenge: CPU-optimized byte-wise or-equals (for a xhoster@gmail.com
Re: Challenge: CPU-optimized byte-wise or-equals (for a <bik.mido@tiscalinet.it>
Re: Help Prima work on WIndows!! <invalid@invalid.org>
Re: how to remove duplicate header line in CGI <tadmc@seesig.invalid>
Re: how to remove duplicate header line in CGI <benkasminbullock@gmail.com>
Re: looking at parsing procedures <zaxfuuq@invalid.net>
Re: looking at parsing procedures <bik.mido@tiscalinet.it>
new CPAN modules on Tue Sep 18 2007 (Randal Schwartz)
Re: Newbie question: load data to array <tadmc@seesig.invalid>
Re: Oneliner problem with < and > in variable <antosim@gmail.com>
Posting Guidelines for comp.lang.perl.misc ($Revision: tadmc@seesig.invalid
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 17 Sep 2007 20:35:19 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: $string =~ /$pattern/i
Message-Id: <slrnfeuaqn.atl.tadmc@tadmc30.sbcglobal.net>
Petr Vileta <stoupa@practisoft.cz> wrote:
> Tad McClellan wrote:
>> sln@netherlands.co <sln@netherlands.co> wrote:
>>
>>
>>> Quote meta doesen't work for everything.
>>
>>
>> Yes it does.
>
> I don't know what version of Perl you use
That's OK, as it is not relevant.
> but in my Perl 5.6.1 quotemeta
> sometime return curious results ;-)
>
> print quotemeta('This is a string');
>>This\ is\ a\ string
>
> By me the space (0x20h) is not need to escape.
Errr, then don't call quotemeta on it!
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Mon, 17 Sep 2007 20:42:59 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <slrnfeub93.atl.tadmc@tadmc30.sbcglobal.net>
Michele Dondi <bik.mido@tiscalinet.it> wrote:
> On Thu, 13 Sep 2007 22:40:19 GMT, Uri Guttman <uri@stemsystems.com>
> wrote:
>
>>i am not there because of the web api (why no news/email gateway?) and
> ^^^^^^^^^^^^^^^^^^
> ^^^^^^^^^^^^^^^^^^
>
>>because i have never was into the monk culture. and yes i know plenty of
>
> I would dream of such a beast.
Your dream is my nightmare. :-(
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Mon, 17 Sep 2007 20:57:03 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <slrnfeuc3f.atl.tadmc@tadmc30.sbcglobal.net>
brian d foy <brian.d.foy@gmail.com> wrote:
> In article <9o1te3tk0ak0bgi0053frtk3ej7813nrhj@4ax.com>, Michele Dondi
><bik.mido@tiscalinet.it> wrote:
> That doesn't necessarily mean he wants it published in some
> other way.
>
> See "transformative effect" discussions about copyright, which I
> mentioned earlier.
>
>> Do you see a problem of ethic nature?
>
> Well, I do, but that doesn't mean that everyone does. I certainly think
> it is rude to the author to simply repost an entire post.
I become incensed with so-called "forums" such as thescripts.com
where my posts here are disguised as if they were posts made there
(by virtue of them labelling me a "Guest", I am NOT their guest,
never was, never will be).
I make killfile entries for the entire domain whenever I come across
such abusers of our community.
Should you happen to "cross pollinate" someone who strongly
opposes the forum they did not post to, it might lead to similar bad
feelings...
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: 18 Sep 2007 04:31:35 GMT
From: xhoster@gmail.com
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <20070918003139.752$ny@newsreader.com>
jgraber@ti.com wrote:
> jgraber@ti.com writes:
>
> > Michele Dondi <bik.mido@tiscalinet.it> writes:
> >
> > > I have two very long (>64k) strings of equal lengths - $s1 and $s2.
> > > They are strings of bytes, meaning that any value from chr(0) to
> > > chr(255) is legal. $s2, however, will not have any chr(0). $s1 may or
> > > may not have any. What I need to do is look at each byte in $s1 and
> > > if it is chr(0), replace it with the corresponding byte in $s2.
> >
> > (my $s1m = $s1) =~ tr/\000-\377/\377\000/;
> > $s1 |= ($s2 & $s1m);
>
> Converted to a subroutine suitable for previous benchmark program
>
> sub trandor_ref{
> my ($s1ref, $s2ref) = @_;
> (my $s1m = $$s1ref) =~ tr/\000-\377/\377\000/;
> $$s1ref |= ($$s2 & $s1m);
> }
Alas, I suspect it is giving you the wrong answer. $s2 is not
declared in that sub, so either you are using the package variable, or are
accidentally using an $s2 declared elsewhere.
>
> Benchmark results:
> Rate avar2 moritz trandor_ref
> avar2 1244/s -- -26% -95%
> moritz 1673/s 34% -- -93%
> trandor_ref 22904/s 1741% 1269% --
When I fix the $$s2 to $$s2ref, it gets a lot slower, but does
give the right answer. If I change the tr to be tr/\000/\377/
it still seems to give the right answer, but is now a lot faster
(The fastest pure Perl implementation I've seen yet.)
avar2 1378/s
trandor_ref 1884/s
moritz 1889/s
joel 2765/s
inline_c 8266/s
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: Tue, 18 Sep 2007 11:11:54 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
Message-Id: <6i5ve3d304mjs2jkcno30mckur0hv8oit5@4ax.com>
On 17 Sep 2007 14:46:21 -0500, jgraber@ti.com wrote:
>If perl6 had another version of tr/// that returned the resulting
>string instead of the number of matches, this could be a 1-liner.
It will certainly have the trans() method to that effect.
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: Tue, 18 Sep 2007 10:36:04 +0200
From: David Sudlow <invalid@invalid.org>
Subject: Re: Help Prima work on WIndows!!
Message-Id: <46ef8df9$0$25933$ba4acef3@news.orange.fr>
jis wrote:
> I am having really a tought time making Prima work on WIndows.
> I get an error "No appropriate Codec found"
>
> I have installed
>
> 1. Prima 1.22
> 2. Prima-prigraph-win32-1.01 from CPAN.
> 3. I use WIndows xp.
> 4. Visual Studio 6.0
>
> Anything I can do to make it work fine.
>
> My sample code was
>
> use Prima qw(Application);
>
> # create a new image from scratch
> my $i = Prima::Image-> new(
> width => 32,
> height => 32,
> type => im::BW, # same as im::bpp1 | im::GrayScale
> );
>
> # draw something
> $i-> begin_paint;
> $i-> color( cl::White);
> $i-> ellipse( 5, 5, 10, 10);
> $i-> end_paint;
>
> # mangle
> $i-> size( 64, 64);
>
> # file operations
> $i-> save('paint.gif') or die "Error saving:$@\n";
> $i-> load('paint.gif') or die "Error loading:$@\n";
>
> Cheers,
> Jis
>
have you got libungif installed? I'd guess you are missing gif codecs or
not pointing prima to them.
------------------------------
Date: Mon, 17 Sep 2007 21:03:24 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: how to remove duplicate header line in CGI
Message-Id: <slrnfeucfc.atl.tadmc@tadmc30.sbcglobal.net>
dmedhora@gmail.com <dmedhora@gmail.com> wrote:
> When I write a CGI script in perl I seem to get this line printed out
> TWICE !
>
> Content-Type: text/html; charset=iso-8859-1
> Any idea how I may get rid of this duplication ?
Yes. Find the 2 places in your code that are outputting that header,
and remove one of them.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Tue, 18 Sep 2007 06:53:58 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: how to remove duplicate header line in CGI
Message-Id: <fcnsm6$o91$1@ml.accsnet.ne.jp>
On Mon, 17 Sep 2007 13:25:11 -0700, dmedhora wrote:
> Hi,
> When I write a CGI script in perl I seem to get this line printed out
> TWICE !
>
> Content-Type: text/html; charset=iso-8859-1
If I try this:
#!/usr/bin/perl
use warnings;use strict;
use CGI;
my $nice_cgi=CGI::new();
print $nice_cgi->header();
I just get it once.
> It also shows up in the web browser as the first line, when I execute
> the same from my cgi-bin
> dir.
>
> Any idea how I may get rid of this duplication ?
It's really, really hard to say why the duplication is occurring without
looking at your script. Perhaps you have something like this, for example:
print $nice_cgi->header();
print $nice_cgi->header();
That would cause the problem you describe. Alternatively,
for (my $i=0; $i < 2; $i++) {
print $nice_cgi->header();
}
would also suffice to create this computational conundrum.
> It could be causing
> problems while
> I debug and run my programs..
------------------------------
Date: Mon, 17 Sep 2007 23:02:34 -0700
From: "Wade Ward" <zaxfuuq@invalid.net>
Subject: Re: looking at parsing procedures
Message-Id: <g7mdndjmkvlgxnLbnZ2dnUVZ_h-vnZ2d@comcast.com>
I've got backlash syndrom. After looking at linux and windows for twenty
years my chance of getting one or the other is fifty fifty, when the
difference matters.
So one indicates a string literal by bracketing with backslash?
--
Wade Ward
wade@zaxfuuq.net
"I ain't got time to bleed."
"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message
news:vkjte31tvcgba67vpr7ej9f3rh089plceh@4ax.com...
> On Mon, 17 Sep 2007 11:10:54 -0700, "Wade Ward" <zaxfuuq@invalid.net>
> wrote:
>
>>How do I test the subject line to see whether 'Solaris' occurs?
>
> /Solaris/
>
>
> 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: Tue, 18 Sep 2007 11:40:42 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: looking at parsing procedures
Message-Id: <v96ve3190qo083jkl2trbp4v9q3ob6kh5s@4ax.com>
On Mon, 17 Sep 2007 23:02:34 -0700, "Wade Ward" <zaxfuuq@invalid.net>
wrote:
>I've got backlash syndrom. After looking at linux and windows for twenty
Please try to quote properly. It's getting increasingly difficult to
reply to your posts. I had written:
: >How do I test the subject line to see whether 'Solaris' occurs?
:
: /Solaris/
Then you go on:
>years my chance of getting one or the other is fifty fifty, when the
>difference matters.
>
I just meant that if $str is your string then to test whether it
contains "Solaris" you can do
if ($str =~ /Solaris/) { ... }
If the string is in $_ you can just do
if (/Solaris/) { ... }
Or else you can use the specialized index() function about which you
can read in
perldoc -f index
But *IIRC* the regex engine optimizes the above match to index()
anyway.
>So one indicates a string literal by bracketing with backslash?
Huh?!? No, one specifies a literal string with the q() and qq()
operators, commonly disguised as '' and "" respectively. Instead you
can use the m() match operator to check for a pattern which needs not
be a literal string, but if it is (i.e. it contains no metacharachters
having a special meaning in regexen) then it is treated as a pattern
as well. If you use forward slashes as delimiters, then you can omit
the "m".
At this point I strongly recommend you to carefully read the "Quote
and Quote-like Operators" section in
perldoc perlop
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: Tue, 18 Sep 2007 04:42:18 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Tue Sep 18 2007
Message-Id: <JoJrqI.9EF@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-NGram-0.3
http://search.cpan.org/~revmischa/Algorithm-NGram-0.3/
----
Apache-Auth-UserDB-v0.120
http://search.cpan.org/~jmehnle/Apache-Auth-UserDB-v0.120/
Manipulation of Apache user authentication databases
----
Apache-ImgIndex-0.01
http://search.cpan.org/~jpavlick/Apache-ImgIndex-0.01/
----
Apache2-MultiAuth-0.0.2
http://search.cpan.org/~alexs/Apache2-MultiAuth-0.0.2/
Use a number of authentication modules at runtime
----
Apache2-MultiAuth-1.0.0
http://search.cpan.org/~alexs/Apache2-MultiAuth-1.0.0/
Use a number of authentication modules at runtime
----
Atompub-0.1.4
http://search.cpan.org/~takeru/Atompub-0.1.4/
Atom Publishing Protocol implementation
----
Authen-DecHpwd-2.002
http://search.cpan.org/~zefram/Authen-DecHpwd-2.002/
DEC VMS password hashing
----
Business-BR-Ids-0.00_21
http://search.cpan.org/~ferreira/Business-BR-Ids-0.00_21/
Modules for dealing with Brazilian identification codes (CPF, CNPJ, ...)
----
CFPlus-0.99a
http://search.cpan.org/~mlehmann/CFPlus-0.99a/
undocumented utility garbage for our crossfire client
----
CGI-Application-Plugin-JSON-0.3
http://search.cpan.org/~wonko/CGI-Application-Plugin-JSON-0.3/
easy manipulation of JSON headers
----
CGI-PathInfo-1.03
http://search.cpan.org/~leocharre/CGI-PathInfo-1.03/
----
Catalyst-Plugin-Apoptosis-0.00001
http://search.cpan.org/~dmaki/Catalyst-Plugin-Apoptosis-0.00001/
Stop Execution Of A Catalyst App
----
ClearCase-Argv-1.26
http://search.cpan.org/~dsb/ClearCase-Argv-1.26/
ClearCase-specific subclass of Argv
----
Coat-0.1_0.2
http://search.cpan.org/~sukria/Coat-0.1_0.2/
a meta class for building light objects with accessors
----
Crypt-Eksblowfish-0.002
http://search.cpan.org/~zefram/Crypt-Eksblowfish-0.002/
the Eksblowfish block cipher
----
Crypt-SSLeay-0.57
http://search.cpan.org/~dland/Crypt-SSLeay-0.57/
OpenSSL support for LWP
----
DBIx-Simple-1.32
http://search.cpan.org/~juerd/DBIx-Simple-1.32/
Easy-to-use OO interface to DBI
----
Date-Span-1.122
http://search.cpan.org/~rjbs/Date-Span-1.122/
deal with date/time ranges than span multiple dates
----
Date-Span-1.123
http://search.cpan.org/~rjbs/Date-Span-1.123/
deal with date/time ranges than span multiple dates
----
DateTime-Format-Strptime-1.0701
http://search.cpan.org/~rickm/DateTime-Format-Strptime-1.0701/
Parse and format strp and strf time patterns
----
DateTime-Format-Strptime-1.0702
http://search.cpan.org/~rickm/DateTime-Format-Strptime-1.0702/
Parse and format strp and strf time patterns
----
Devel-PerlySense-0.01_19
http://search.cpan.org/~johanl/Devel-PerlySense-0.01_19/
IntelliSense for Perl
----
Devel-PerlySense-0.01_20
http://search.cpan.org/~johanl/Devel-PerlySense-0.01_20/
IntelliSense for Perl
----
E_Editor_4.42
http://search.cpan.org/~turnerjw/E_Editor_4.42/
----
Email-Send-2.189
http://search.cpan.org/~rjbs/Email-Send-2.189/
Simply Sending Email
----
Geo-GoogleEarth-Document-0.03
http://search.cpan.org/~mrdvt/Geo-GoogleEarth-Document-0.03/
Creates a GoogleEarth KML Document
----
Geo-GoogleEarth-Document-0.04
http://search.cpan.org/~mrdvt/Geo-GoogleEarth-Document-0.04/
Creates a GoogleEarth KML Document
----
Geo-GoogleEarth-Document-0.05
http://search.cpan.org/~mrdvt/Geo-GoogleEarth-Document-0.05/
Creates a GoogleEarth KML Document
----
Glib-1.160
http://search.cpan.org/~tsch/Glib-1.160/
Perl wrappers for the GLib utility and Object libraries
----
Gnome2-VFS-1.080
http://search.cpan.org/~tsch/Gnome2-VFS-1.080/
Perl interface to the 2.x series of the GNOME VFS library
----
Gtk2-1.160
http://search.cpan.org/~tsch/Gtk2-1.160/
Perl interface to the 2.x series of the Gimp Toolkit library
----
HTML-Debug-0.11
http://search.cpan.org/~mrandall/HTML-Debug-0.11/
Enables the output of variable and query debugging information for display in HTML.
----
HTML-Debug-0.12
http://search.cpan.org/~mrandall/HTML-Debug-0.12/
Enables the output of variable and query debugging information for display in HTML.
----
HTML-Table-2.07-b1
http://search.cpan.org/~ajpeacock/HTML-Table-2.07-b1/
produces HTML tables
----
IPC-Filter-0.002
http://search.cpan.org/~zefram/IPC-Filter-0.002/
filter data through an external process
----
Image-Mate-0.05
http://search.cpan.org/~cosmicnet/Image-Mate-0.05/
Interface to Gd, Imager, ImageMagick modules
----
ImgIndex-0.01
http://search.cpan.org/~jpavlick/ImgIndex-0.01/
----
KinoSearch-0.16
http://search.cpan.org/~creamyg/KinoSearch-0.16/
search engine library
----
KinoSearch-0.161
http://search.cpan.org/~creamyg/KinoSearch-0.161/
search engine library
----
LEOCHARRE-Class-1.10
http://search.cpan.org/~leocharre/LEOCHARRE-Class-1.10/
----
Lingua-Zompist-Cuezi-0.01
http://search.cpan.org/~pne/Lingua-Zompist-Cuezi-0.01/
Inflect Cuezi nouns, verbs, and adjectives
----
LoadHtml-7.02
http://search.cpan.org/~turnerjw/LoadHtml-7.02/
----
Mail-Audit-2.221
http://search.cpan.org/~rjbs/Mail-Audit-2.221/
Library for creating easy mail filters
----
Mail-Postini-0.15
http://search.cpan.org/~scottw/Mail-Postini-0.15/
Perl extension for talking to Postini
----
Mail-SpamAssassin-SimpleClient-0.005
http://search.cpan.org/~rjbs/Mail-SpamAssassin-SimpleClient-0.005/
easy client to SpamAssassin's spamd
----
Math-Expression-Evaluator-0.0.2
http://search.cpan.org/~moritz/Math-Expression-Evaluator-0.0.2/
parses and evaluates mathematic expressions
----
Module-Runtime-0.005
http://search.cpan.org/~zefram/Module-Runtime-0.005/
runtime module handling
----
Net-FullAuto-0.05
http://search.cpan.org/~reedfish/Net-FullAuto-0.05/
Perl Based Secure Distributed Computing Network Process Automation Utility
----
Net-TrackUPS-0.01
http://search.cpan.org/~dgrizzant/Net-TrackUPS-0.01/
Interface to UPS's Tracking Web Services
----
Object-InsideOut-3.26
http://search.cpan.org/~jdhedden/Object-InsideOut-3.26/
Comprehensive inside-out object support module
----
PDF-API2-0.64
http://search.cpan.org/~areibens/PDF-API2-0.64/
A Perl Module Chain to faciliate the Creation and Modification of High-Quality "Portable Document Format (aka. PDF)" Files.
----
PDL-NetCDF-0.93
http://search.cpan.org/~dhunt/PDL-NetCDF-0.93/
Object-oriented interface between NetCDF files and PDL objects.
----
Parse-Eyapp-1.078
http://search.cpan.org/~casiano/Parse-Eyapp-1.078/
Extensions for Parse::Yapp
----
Parse-Eyapp-1.079
http://search.cpan.org/~casiano/Parse-Eyapp-1.079/
Extensions for Parse::Yapp
----
Parse-Eyapp-1.080
http://search.cpan.org/~casiano/Parse-Eyapp-1.080/
Extensions for Parse::Yapp
----
Prima-prigraph-win32-1.02
http://search.cpan.org/~karasik/Prima-prigraph-win32-1.02/
binary prigraph.dll distribution for win32
----
Prima-prigraph-win32-1.03
http://search.cpan.org/~karasik/Prima-prigraph-win32-1.03/
binary prigraph.dll distribution for win32
----
Sys-Statistics-Linux-0.16
http://search.cpan.org/~bloonix/Sys-Statistics-Linux-0.16/
Front-end module to collect system statistics
----
Template-Declare-Anon-0.01
http://search.cpan.org/~nuffin/Template-Declare-Anon-0.01/
Anonymous Template::Declare templates
----
Test-MinimumVersion-0.007
http://search.cpan.org/~rjbs/Test-MinimumVersion-0.007/
does your code require newer perl than you think?
----
Test-WWW-Mechanize-Catalyst-0.41
http://search.cpan.org/~lbrocard/Test-WWW-Mechanize-Catalyst-0.41/
Test::WWW::Mechanize for Catalyst
----
Time-UTC-0.005
http://search.cpan.org/~zefram/Time-UTC-0.005/
manipulation of UTC in terms of TAI
----
Tk-IDElayout-0.3
http://search.cpan.org/~cerney/Tk-IDElayout-0.3/
Tk Widget for Layout of Frames Similar to an IDE.
----
VCI-0.2.1
http://search.cpan.org/~mkanat/VCI-0.2.1/
A generic interface for interacting with various version-control systems.
----
WWW-Mechanize-Meta-0.03
http://search.cpan.org/~gugu/WWW-Mechanize-Meta-0.03/
Adds HEAD tag parsing to WWW::Mechanize
----
XML-NewsML-0.5
http://search.cpan.org/~andy/XML-NewsML-0.5/
Simple interface for creating NewsML documents
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: Mon, 17 Sep 2007 21:11:57 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Newbie question: load data to array
Message-Id: <slrnfeucvd.atl.tadmc@tadmc30.sbcglobal.net>
Ben Morrow <ben@morrow.me.uk> wrote:
> Quoth Martijn Lievaart <m@rtij.nl.invlalid>:
>> close $fh;
>
> If you're not going to check the return value of close there's no need
> (with a lexical FH) to call it.
There's no need if the FH was opened for input.
If, however, it was opened for output, then an explicit close() is
a pretty good idea, even when you don't check its return value.
If you like to see others in pain, then check out my tale of woe:
http://groups.google.com/group/comp.lang.perl.misc/msg/73d4587743c64e2f
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Tue, 18 Sep 2007 01:36:14 -0700
From: Ansim <antosim@gmail.com>
Subject: Re: Oneliner problem with < and > in variable
Message-Id: <1190104574.093363.327540@g4g2000hsf.googlegroups.com>
Thanks all for the help.
Glenn and Michal helped a lot.
The rest helped me with understanding the importance of qouting.
Perl interpreted the < and > in a strange way othervise.
BR
//Anders
------------------------------
Date: Tue, 18 Sep 2007 07:10:12 GMT
From: tadmc@seesig.invalid
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.8 $)
Message-Id: <oRKHi.5862$FO2.5504@newssvr14.news.prodigy.net>
Outline
Before posting to comp.lang.perl.misc
Must
- Check the Perl Frequently Asked Questions (FAQ)
- Check the other standard Perl docs (*.pod)
Really Really Should
- Lurk for a while before posting
- Search a Usenet archive
If You Like
- Check Other Resources
Posting to comp.lang.perl.misc
Is there a better place to ask your question?
- Question should be about Perl, not about the application area
How to participate (post) in the clpmisc community
- Carefully choose the contents of your Subject header
- Use an effective followup style
- Speak Perl rather than English, when possible
- Ask perl to help you
- Do not re-type Perl code
- Provide enough information
- Do not provide too much information
- Do not post binaries, HTML, or MIME
Social faux pas to avoid
- Asking a Frequently Asked Question
- Asking a question easily answered by a cursory doc search
- Asking for emailed answers
- Beware of saying "doesn't work"
- Sending a "stealth" Cc copy
Be extra cautious when you get upset
- Count to ten before composing a followup when you are upset
- Count to ten after composing and before posting when you are upset
-----------------------------------------------------------------
Posting Guidelines for comp.lang.perl.misc ($Revision: 1.8 $)
This newsgroup, commonly called clpmisc, is a technical newsgroup
intended to be used for discussion of Perl related issues (except job
postings), whether it be comments or questions.
As you would expect, clpmisc discussions are usually very technical in
nature and there are conventions for conduct in technical newsgroups
going somewhat beyond those in non-technical newsgroups.
The article at:
http://www.catb.org/~esr/faqs/smart-questions.html
describes how to get answers from technical people in general.
This article describes things that you should, and should not, do to
increase your chances of getting an answer to your Perl question. It is
available in POD, HTML and plain text formats at:
http://www.rehabitation.com/clpmisc.shtml
For more information about netiquette in general, see the "Netiquette
Guidelines" at:
http://andrew2.andrew.cmu.edu/rfc/rfc1855.html
A note to newsgroup "regulars":
Do not use these guidelines as a "license to flame" or other
meanness. It is possible that a poster is unaware of things
discussed here. Give them the benefit of the doubt, and just
help them learn how to post, rather than assume that they do
know and are being the "bad kind" of Lazy.
A note about technical terms used here:
In this document, we use words like "must" and "should" as
they're used in technical conversation (such as you will
encounter in this newsgroup). When we say that you *must* do
something, we mean that if you don't do that something, then
it's unlikely that you will benefit much from this group.
We're not bossing you around; we're making the point without
lots of words.
Do *NOT* send email to the maintainer of these guidelines. It will be
discarded unread. The guidelines belong to the newsgroup so all
discussion should appear in the newsgroup. I am just the secretary that
writes down the consensus of the group.
Before posting to comp.lang.perl.misc
Must
This section describes things that you *must* do before posting to
clpmisc, in order to maximize your chances of getting meaningful replies
to your inquiry and to avoid getting flamed for being lazy and trying to
have others do your work.
The perl distribution includes documentation that is copied to your hard
drive when you install perl. Also installed is a program for looking
things up in that (and other) documentation named 'perldoc'.
You should either find out where the docs got installed on your system,
or use perldoc to find them for you. Type "perldoc perldoc" to learn how
to use perldoc itself. Type "perldoc perl" to start reading Perl's
standard documentation.
Check the Perl Frequently Asked Questions (FAQ)
Checking the FAQ before posting is required in Big 8 newsgroups in
general, there is nothing clpmisc-specific about this requirement.
You are expected to do this in nearly all newsgroups.
You can use the "-q" switch with perldoc to do a word search of the
questions in the Perl FAQs.
Check the other standard Perl docs (*.pod)
The perl distribution comes with much more documentation than is
available for most other newsgroups, so in clpmisc you should also
see if you can find an answer in the other (non-FAQ) standard docs
before posting.
It is *not* required, or even expected, that you actually *read* all of
Perl's standard docs, only that you spend a few minutes searching them
before posting.
Try doing a word-search in the standard docs for some words/phrases
taken from your problem statement or from your very carefully worded
"Subject:" header.
Really Really Should
This section describes things that you *really should* do before posting
to clpmisc.
Lurk for a while before posting
This is very important and expected in all newsgroups. Lurking means
to monitor a newsgroup for a period to become familiar with local
customs. Each newsgroup has specific customs and rituals. Knowing
these before you participate will help avoid embarrassing social
situations. Consider yourself to be a foreigner at first!
Search a Usenet archive
There are tens of thousands of Perl programmers. It is very likely
that your question has already been asked (and answered). See if you
can find where it has already been answered.
One such searchable archive is:
http://groups.google.com/advanced_group_search
If You Like
This section describes things that you *can* do before posting to
clpmisc.
Check Other Resources
You may want to check in books or on web sites to see if you can
find the answer to your question.
But you need to consider the source of such information: there are a
lot of very poor Perl books and web sites, and several good ones
too, of course.
Posting to comp.lang.perl.misc
There can be 200 messages in clpmisc in a single day. Nobody is going to
read every article. They must decide somehow which articles they are
going to read, and which they will skip.
Your post is in competition with 199 other posts. You need to "win"
before a person who can help you will even read your question.
These sections describe how you can help keep your article from being
one of the "skipped" ones.
Is there a better place to ask your question?
Question should be about Perl, not about the application area
It can be difficult to separate out where your problem really is,
but you should make a conscious effort to post to the most
applicable newsgroup. That is, after all, where you are the most
likely to find the people who know how to answer your question.
Being able to "partition" a problem is an essential skill for
effectively troubleshooting programming problems. If you don't get
that right, you end up looking for answers in the wrong places.
It should be understood that you may not know that the root of your
problem is not Perl-related (the two most frequent ones are CGI and
Operating System related), so off-topic postings will happen from
time to time. Be gracious when someone helps you find a better place
to ask your question by pointing you to a more applicable newsgroup.
How to participate (post) in the clpmisc community
Carefully choose the contents of your Subject header
You have 40 precious characters of Subject to win out and be one of
the posts that gets read. Don't waste them. Take care while
composing them, they are the key that opens the door to getting an
answer.
Spend them indicating what aspect of Perl others will find if they
should decide to read your article.
Do not spend them indicating "experience level" (guru, newbie...).
Do not spend them pleading (please read, urgent, help!...).
Do not spend them on non-Subjects (Perl question, one-word
Subject...)
For more information on choosing a Subject see "Choosing Good
Subject Lines":
http://www.cpan.org/authors/id/D/DM/DMR/subjects.post
Part of the beauty of newsgroup dynamics, is that you can contribute
to the community with your very first post! If your choice of
Subject leads a fellow Perler to find the thread you are starting,
then even asking a question helps us all.
Use an effective followup style
When composing a followup, quote only enough text to establish the
context for the comments that you will add. Always indicate who
wrote the quoted material. Never quote an entire article. Never
quote a .signature (unless that is what you are commenting on).
Intersperse your comments *following* each section of quoted text to
which they relate. Unappreciated followup styles are referred to as
"top-posting", "Jeopardy" (because the answer comes before the
question), or "TOFU" (Text Over, Fullquote Under).
Reversing the chronology of the dialog makes it much harder to
understand (some folks won't even read it if written in that style).
For more information on quoting style, see:
http://web.presby.edu/~nnqadmin/nnq/nquote.html
Speak Perl rather than English, when possible
Perl is much more precise than natural language. Saying it in Perl
instead will avoid misunderstanding your question or problem.
Do not say: I have variable with "foo\tbar" in it.
Instead say: I have $var = "foo\tbar", or I have $var = 'foo\tbar',
or I have $var = <DATA> (and show the data line).
Ask perl to help you
You can ask perl itself to help you find common programming mistakes
by doing two things: enable warnings (perldoc warnings) and enable
"strict"ures (perldoc strict).
You should not bother the hundreds/thousands of readers of the
newsgroup without first seeing if a machine can help you find your
problem. It is demeaning to be asked to do the work of a machine. It
will annoy the readers of your article.
You can look up any of the messages that perl might issue to find
out what the message means and how to resolve the potential mistake
(perldoc perldiag). If you would like perl to look them up for you,
you can put "use diagnostics;" near the top of your program.
Do not re-type Perl code
Use copy/paste or your editor's "import" function rather than
attempting to type in your code. If you make a typo you will get
followups about your typos instead of about the question you are
trying to get answered.
Provide enough information
If you do the things in this item, you will have an Extremely Good
chance of getting people to try and help you with your problem!
These features are a really big bonus toward your question winning
out over all of the other posts that you are competing with.
First make a short (less than 20-30 lines) and *complete* program
that illustrates the problem you are having. People should be able
to run your program by copy/pasting the code from your article. (You
will find that doing this step very often reveals your problem
directly. Leading to an answer much more quickly and reliably than
posting to Usenet.)
Describe *precisely* the input to your program. Also provide example
input data for your program. If you need to show file input, use the
__DATA__ token (perldata.pod) to provide the file contents inside of
your Perl program.
Show the output (including the verbatim text of any messages) of
your program.
Describe how you want the output to be different from what you are
getting.
If you have no idea at all of how to code up your situation, be sure
to at least describe the 2 things that you *do* know: input and
desired output.
Do not provide too much information
Do not just post your entire program for debugging. Most especially
do not post someone *else's* entire program.
Do not post binaries, HTML, or MIME
clpmisc is a text only newsgroup. If you have images or binaries
that explain your question, put them in a publically accessible
place (like a Web server) and provide a pointer to that location. If
you include code, cut and paste it directly in the message body.
Don't attach anything to the message. Don't post vcards or HTML.
Many people (and even some Usenet servers) will automatically filter
out such messages. Many people will not be able to easily read your
post. Plain text is something everyone can read.
Social faux pas to avoid
The first two below are symptoms of lots of FAQ asking here in clpmisc.
It happens so often that folks will assume that it is happening yet
again. If you have looked but not found, or found but didn't understand
the docs, say so in your article.
Asking a Frequently Asked Question
It should be understood that you may have missed the applicable FAQ
when you checked, which is not a big deal. But if the Frequently
Asked Question is worded similar to your question, folks will assume
that you did not look at all. Don't become indignant at pointers to
the FAQ, particularly if it solves your problem.
Asking a question easily answered by a cursory doc search
If folks think you have not even tried the obvious step of reading
the docs applicable to your problem, they are likely to become
annoyed.
If you are flamed for not checking when you *did* check, then just
shrug it off (and take the answer that you got).
Asking for emailed answers
Emailed answers benefit one person. Posted answers benefit the
entire community. If folks can take the time to answer your
question, then you can take the time to go get the answer in the
same place where you asked the question.
It is OK to ask for a *copy* of the answer to be emailed, but many
will ignore such requests anyway. If you munge your address, you
should never expect (or ask) to get email in response to a Usenet
post.
Ask the question here, get the answer here (maybe).
Beware of saying "doesn't work"
This is a "red flag" phrase. If you find yourself writing that,
pause and see if you can't describe what is not working without
saying "doesn't work". That is, describe how it is not what you
want.
Sending a "stealth" Cc copy
A "stealth Cc" is when you both email and post a reply without
indicating *in the body* that you are doing so.
Be extra cautious when you get upset
Count to ten before composing a followup when you are upset
This is recommended in all Usenet newsgroups. Here in clpmisc, most
flaming sub-threads are not about any feature of Perl at all! They
are most often for what was seen as a breach of netiquette. If you
have lurked for a bit, then you will know what is expected and won't
make such posts in the first place.
But if you get upset, wait a while before writing your followup. I
recommend waiting at least 30 minutes.
Count to ten after composing and before posting when you are upset
After you have written your followup, wait *another* 30 minutes
before committing yourself by posting it. You cannot take it back
once it has been said.
AUTHOR
Tad McClellan and many others on the comp.lang.perl.misc newsgroup.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
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 861
**************************************