[30251] in Perl-Users-Digest
Perl-Users Digest, Issue: 1494 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 30 06:09:44 2008
Date: Wed, 30 Apr 2008 03:09:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 30 Apr 2008 Volume: 11 Number: 1494
Today's topics:
cperl-mode.el (was: Re: FAQ 3.12 Where can I get perl-m (Ben Bullock)
Re: cperl-mode.el (was: Re: FAQ 3.12 Where can I get pe <brian.d.foy@gmail.com>
Eclipse 4.0 beta - New, Crisp UI. Supports C/C++/Java/P <b.cilfone.uber@googlemail.com>
Re: Global symbol "%Properties" requires explicit packa <m@rtij.nl.invlalid>
Re: Global symbol "%Properties" requires explicit packa <rvtol+news@isolution.nl>
new CPAN modules on Wed Apr 30 2008 (Randal Schwartz)
Python's doc problems: sort <xahlee@gmail.com>
Re: Python's doc problems: sort <jurgenex@hotmail.com>
Re: Python's doc problems: sort <george.sakkis@gmail.com>
Read 20 lines when pressing n for next s9uzaa@gmail.com
Re: Read 20 lines when pressing n for next <jurgenex@hotmail.com>
Re: Read 20 lines when pressing n for next <1usa@llenroc.ude.invalid>
What's wrong with transparency by GD? <ela@yantai.org>
Re: Windows mail. <DaveN@DaveN.COM>
Re: WWW::Mechanize doesn't always follow_link(text <m@rtij.nl.invlalid>
Re: WWW::Mechanize doesn't always follow_link(text <rvtol+news@isolution.nl>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 30 Apr 2008 00:23:51 +0000 (UTC)
From: benkasminbullock@gmail.com (Ben Bullock)
Subject: cperl-mode.el (was: Re: FAQ 3.12 Where can I get perl-mode for emacs?)
Message-Id: <fv8e6n$rs2$1@ml.accsnet.ne.jp>
PerlFAQ Server <brian@stonehenge.com> wrote:
>
> In the Perl source directory, you'll find a directory called "emacs",
> which contains a cperl-mode that color-codes keywords, provides
> context-sensitive help, and other nifty things.
This advice is outdated, because 'cperl-mode.el' is now part of the
Emacs distribution, so it's not necessary to look in the Perl source
directory.
> Working code is greatly appreciated.
I add the following line to Emacs to make cperl the default:
(defalias 'perl-mode 'cperl-mode)
I also have the following defaults:
(setq cperl-indent-level 4
cperl-close-paren-offset -4
cperl-brace-offset -4
cperl-label-offset 0
cperl-continued-statement-offset 4
cperl-tab-always-indent t)
------------------------------
Date: Wed, 30 Apr 2008 07:49:52 +0200
From: brian d foy <brian.d.foy@gmail.com>
To: benkasminbullock@gmail.com (Ben Bullock)
Subject: Re: cperl-mode.el (was: Re: FAQ 3.12 Where can I get perl-mode for emacs?)
Message-Id: <300420080749526116%brian.d.foy@gmail.com>
[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]
In article <fv8e6n$rs2$1@ml.accsnet.ne.jp>, Ben Bullock
<benkasminbullock@gmail.com> wrote:
> PerlFAQ Server <brian@stonehenge.com> wrote:
> >
> > In the Perl source directory, you'll find a directory called "emacs",
> > which contains a cperl-mode that color-codes keywords, provides
> > context-sensitive help, and other nifty things.
>
> This advice is outdated, because 'cperl-mode.el' is now part of the
> Emacs distribution, so it's not necessary to look in the Perl source
> directory.
Since I don't use emacs, perhaps you could rewrite the entire answer
for me :)
------------------------------
Date: Tue, 29 Apr 2008 19:47:20 -0700 (PDT)
From: Ubersite <b.cilfone.uber@googlemail.com>
Subject: Eclipse 4.0 beta - New, Crisp UI. Supports C/C++/Java/PHP/Perl by default
Message-Id: <807caef2-7662-4b4c-94f8-ea524fee0ef6@m73g2000hsh.googlegroups.com>
www.ubersite.com - Future of media
get the latest news on open source
this is a post by the users of ubersite so we cannot be held liable or
to blame.
-ubersite
------------------------------
Date: Tue, 29 Apr 2008 22:52:40 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Global symbol "%Properties" requires explicit package name
Message-Id: <pan.2008.04.29.20.52.40@rtij.nl.invlalid>
On Tue, 29 Apr 2008 01:55:44 -0700, mike wrote:
> Hi,
>
> I have declared my %Properties but I get the following when I execute:
>
> Global symbol "%Properties" requires explicit package name at test.pl
> line 62.
A 'my' variable is in scope from the point of definition to the end of
the enclosing block. You're using the variable before it is defined. Just
move the definition to the top of the program.
HTH,
M4
------------------------------
Date: Wed, 30 Apr 2008 10:20:42 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Global symbol "%Properties" requires explicit package name
Message-Id: <fv9hbs.1mg.1@news.isolution.nl>
mike schreef:
> I have declared my %Properties but I get the following when I execute:
>
> Global symbol "%Properties" requires explicit package name at test.pl
> line 62.
You are using %Properties inside deploy(). But it is declared later.
You could move the "my %Properties" further up, but I would pass a
hash-refererence to deploy().
Or are there specifc reasons (like security) to not give deploy the full
%Properties?
readConfig() now returns a list, I would change that to a (scalar
containing a) hashref.
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Wed, 30 Apr 2008 04:42:18 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Apr 30 2008
Message-Id: <K04FqI.1qFz@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.
AIIA-GMT-0.03
http://search.cpan.org/~cjukuo/AIIA-GMT-0.03/
a XML-RPC client of a web-service server, AIIA gene mention tagger, which provides the service to recognize named entities in the biomedical articles
----
AnyEvent-EditText-0.2
http://search.cpan.org/~elmex/AnyEvent-EditText-0.2/
An easy way to startup a text editor
----
App-Cmd-0.014_01
http://search.cpan.org/~rjbs/App-Cmd-0.014_01/
write command line apps with less suffering
----
Asterisk-config-0.96
http://search.cpan.org/~hoowa/Asterisk-config-0.96/
the Asterisk config read and write module.
----
Business-Tax-VAT-Validation-0.19
http://search.cpan.org/~bpgn/Business-Tax-VAT-Validation-0.19/
A class for european VAT numbers validation.
----
CGI-Application-Plugin-ValidateRM-2.2
http://search.cpan.org/~markstos/CGI-Application-Plugin-ValidateRM-2.2/
Help validate CGI::Application run modes using Data::FormValidator
----
Catalyst-Plugin-FillInForm-0.09
http://search.cpan.org/~mramberg/Catalyst-Plugin-FillInForm-0.09/
FillInForm for Catalyst
----
Catalyst-Plugin-Session-Store-DBI-0.13
http://search.cpan.org/~agrundma/Catalyst-Plugin-Session-Store-DBI-0.13/
Store your sessions in a database
----
Config-JFDI-0.03
http://search.cpan.org/~rkrimen/Config-JFDI-0.03/
Just * Do it: A Catalyst::Plugin::ConfigLoader-style layer over Config::Any
----
Crypt-ECDSA-0.067
http://search.cpan.org/~billh/Crypt-ECDSA-0.067/
Elliptical Cryptography Digital Signature Algorithm
----
Crypt-ECDSA-0.068
http://search.cpan.org/~billh/Crypt-ECDSA-0.068/
Elliptical Cryptography Digital Signature Algorithm
----
DBIx-Class-Fixtures-1.001000
http://search.cpan.org/~lsaunders/DBIx-Class-Fixtures-1.001000/
----
DBIx-DataAudit-0.06
http://search.cpan.org/~corion/DBIx-DataAudit-0.06/
summarize column data for a table
----
HTML-RewriteAttributes-0.01
http://search.cpan.org/~sartak/HTML-RewriteAttributes-0.01/
concise attribute rewriting
----
HTTP-Engine-0.0.3
http://search.cpan.org/~yappo/HTTP-Engine-0.0.3/
Web Server Gateway Interface and HTTP Server Engine Drivers (Yet Another Catalyst::Engine)
----
Hash-Util-FieldHash-Compat-0.02
http://search.cpan.org/~nuffin/Hash-Util-FieldHash-Compat-0.02/
Use Hash::Util::FieldHash or ties, depending on availability.
----
IPC-SRLock-0.1.40
http://search.cpan.org/~pjfl/IPC-SRLock-0.1.40/
Set/reset locking semantics to single thread processes
----
JS-YUI-Loader-0.03
http://search.cpan.org/~rkrimen/JS-YUI-Loader-0.03/
Load (and cache) the Yahoo YUI framework
----
Jemplate-0.22
http://search.cpan.org/~rkrimen/Jemplate-0.22/
JavaScript Templating with Template Toolkit
----
Kephra-0.3.9
http://search.cpan.org/~lichtkind/Kephra-0.3.9/
----
LaTeX-TOM-0.9
http://search.cpan.org/~schubiger/LaTeX-TOM-0.9/
A module for parsing, analyzing, and manipulating LaTeX documents.
----
Lingua-Translit-0.13
http://search.cpan.org/~alinke/Lingua-Translit-0.13/
transliterates text between writing systems
----
List-Sliding-Changes-0.03
http://search.cpan.org/~corion/List-Sliding-Changes-0.03/
Extract new elements from a sliding window
----
Log-Dispatch-Array-1.001
http://search.cpan.org/~rjbs/Log-Dispatch-Array-1.001/
log events to an array (reference)
----
Log-Handler-0.39_17
http://search.cpan.org/~bloonix/Log-Handler-0.39_17/
Log messages to one or more outputs.
----
Moose-0.42
http://search.cpan.org/~stevan/Moose-0.42/
A postmodern object system for Perl 5
----
Net-Domain-ExpireDate-0.90
http://search.cpan.org/~despair/Net-Domain-ExpireDate-0.90/
obtain expiration date of domain names
----
Net-SIP-0.45_1
http://search.cpan.org/~sullr/Net-SIP-0.45_1/
Framework SIP (Voice Over IP, RFC3261)
----
Net-Sieve-0.04
http://search.cpan.org/~yvesago/Net-Sieve-0.04/
Implementation of managesieve protocol to manage sieve scripts
----
Number-Range-0.07
http://search.cpan.org/~larrysh/Number-Range-0.07/
Perl extension defining ranges of numbers and testing if a number is found in the range. You can also add and delete from this range.
----
Parse-Stallion-0.009
http://search.cpan.org/~arthur/Parse-Stallion-0.009/
Perl backtracking parser and resultant tree evaluator
----
PerlIO-Util-0.07
http://search.cpan.org/~gfuji/PerlIO-Util-0.07/
A selection of general PerlIO utilities
----
REST-Google-1.0.1
http://search.cpan.org/~ejs/REST-Google-1.0.1/
access Google REST API from Perl
----
SVN-Notify-2.72
http://search.cpan.org/~dwheeler/SVN-Notify-2.72/
Subversion activity notification
----
SVN-Notify-Filter-Watchers-0.05
http://search.cpan.org/~larrysh/SVN-Notify-Filter-Watchers-0.05/
Subscribe to SVN::Notify commits with a Subversion property.
----
Sub-Contract-0.03
http://search.cpan.org/~erwan/Sub-Contract-0.03/
----
Sub-Exporter-0.979
http://search.cpan.org/~rjbs/Sub-Exporter-0.979/
a sophisticated exporter for custom-built routines
----
Test-WWW-Mechanize-Catalyst-0.42
http://search.cpan.org/~lbrocard/Test-WWW-Mechanize-Catalyst-0.42/
Test::WWW::Mechanize for Catalyst
----
WWW-Mechanize-Timed-0.44
http://search.cpan.org/~lbrocard/WWW-Mechanize-Timed-0.44/
Time Mechanize requests
----
XML-Compile-0.81
http://search.cpan.org/~markov/XML-Compile-0.81/
Compilation based XML processing
----
XML-Compile-SOAP-0.73
http://search.cpan.org/~markov/XML-Compile-SOAP-0.73/
base-class for SOAP implementations
----
XML-Compile-Tester-0.02
http://search.cpan.org/~markov/XML-Compile-Tester-0.02/
support XML::Compile related regression testing
----
esjis-0.13
http://search.cpan.org/~ina/esjis-0.13/
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: Tue, 29 Apr 2008 19:48:39 -0700 (PDT)
From: "xahlee@gmail.com" <xahlee@gmail.com>
Subject: Python's doc problems: sort
Message-Id: <929d5ce9-9063-4e6c-98aa-89526f89fba3@y18g2000pre.googlegroups.com>
Of my Python and Perl tutorial at http://xahlee.org/perl-python/index.html
the most popular page is
=E2=80=9CSorting in Python and Perl=E2=80=9D
http://xahlee.org/perl-python/sort_list.html
For example, in last week, that page is fetched 550 times.
The second most popular page, trails quite a distance. Here's the top
3 pages and their number of times fetched:
550 http://xahlee.org/perl-python/sort_list.html
341 http://xahlee.org/perl-python/system_calls.html
222 http://xahlee.org/perl-python/index.html
Note that the first 2 pages are far more popular than the entry page
the table of contents.
Apparently, and also verified by my web log, that people have
difficulty in using sort, and they find my pages thru web search
engines.
------------------
In 2005, i wrote over ten essays detailing Python's documentation
problems. One of them is titled:
=E2=80=9CPython Doc Problem Example: sort()=E2=80=9D
http://xahlee.org/perl-python/python_doc_sort.html
It's been 3 years, and python has gone from 2.4.x to 2.5.2.
Looking at the current version of the doc, apparently, Python doc of
that page hasn't improved a bit.
I want to emphasize a point here, as i have done quite emphatically in
the past. The Python documentation, is the world's worst technical
writing. As far as technical writing goes, it is even worse than
Perl's in my opinion.
Although i disliked Perl very much, in part that it is lead by a cult
figure that manipulates and deceives the populace, but there is at
least one aspect of Perl community that is very positive, namely,
embrace all walks of life. This aspect is taken by a Perl derivative
the Pretty Home Page, and its success surpassed Perl, yet without
Perl's cult string. Now, in my experience, the Python community, is
filled with politics more so than Perl, and far more fucking assholes
with high hats.
Python priests: go fuck yourselfs.
(disclaimer: all statements about actual persons in this post are
statements of opinion.)
----------------------
Now, i find it pertinent to post my essay about the sort documentation
problem again.
The HTML version with colors and formatting is here:
http://xahlee.org/perl-python/python_doc_sort.html
Below is a abridged textual version.
-------------------------------------
Python Doc Problem Example: sort()
Python doc =E2=80=9C3.6.4 Mutable Sequence Types=E2=80=9D at http://python.o=
rg/doc/2.4/lib/typesseq-mutable.html
in which contains the documentation of the =E2=80=9Csort=E2=80=9D method of =
a list.
Quote:
=C2=AB...=C2=BB
As a piece of documentation, this is a lousy one.
The question Python doc writers need to ask when evaluating this piece
of doc are these:
* Can a experienced programer who is expert at several languages
but new to Python, and also have read the official Python tutorial,
can he, read this doc, and know exactly how to use sort with all the
options?
* Can this piece of documentation be rewritten fairly easily, so
that the answer to the previous question is a resounding yes?
To me, the answers to the above questions are No and Yes. Here are
some issues with the doc:
=E2=80=A2 In the paragraph about the =E2=80=9Ckey=E2=80=9D parameter, the il=
lustration given
is: =E2=80=9Ccmp=3Dstr.lower=E2=80=9D. It should be be =E2=80=9Ckey=3Dstr.lo=
wer=E2=80=9D
=E2=80=A2 This doc lacks examples. One or two examples will help a lot,
especially to less experienced programers. (which comprises the
majority of readers) In particular, it should give a full example of
using the comparison function and one with the =E2=80=9Ckey=E2=80=9D paramet=
er.
Examples are particularly needed here because these parameters are
functions, often with the =E2=80=9Clambda=E2=80=9D construct. These are unus=
ual and
advanced constructs among imperative languages.
=E2=80=A2 This doc fails to mention what happens when the predicate and the
shortcut version conflicts. e.g. =E2=80=9CmyList.sort(cmp=3Dlambda x,y:
cmp(x[0], y[0]), key=3Dlambda x: str(x[1]) )=E2=80=9D
=E2=80=A2 The notation the Python doc has adopted for indicating the syntax =
of
optional parameters, does not give a clear view just exactly what
combination of optional parameters can be omitted. The notation:
=E2=80=9Cs.sort([cmp[, key[, reverse]]])=E2=80=9D gives the impression that =
only
trailing arguments can be omitted, which is not true.
=E2=80=A2 The doc gives no indication of how to omit a optional arg. Should =
it
be =E2=80=9Cnul=E2=80=9D, =E2=80=9CNull=E2=80=9D, 0, or left empty? Since it=
doesn't give any
examples, doc reader who isn't Python experts is left to guess at how
true/false values are presented in Python.
=E2=80=A2 On the whole, the way this doc is written does not give a clear
picture of the roles of the supplied options, nor how to use them.
Suggested Quick Remedy: add a example of using the cmp function. And a
example using the =E2=80=9Ckey=E2=80=9D function. Add a example of Using one=
of them
and with reverse. (the examples need not to come with much
explanations. One sentence annotation is better than none.)
Other than that, the way the doc is laid out with a terse table and
run-on footnotes (employed in several places in Python doc) is not
inductive. For a better improvement, there needs to be a overhaul of
the organization and the attitude of the entire doc. The organization
needs to be programing based, as opposed to implementation or computer
science based. (in this regard, one can learn from the Perl folks). As
to attitude, the writing needs to be Python-as-is, as opposed to
computer science framework, as indicated in the early parts of this
critique series.
Addendum, 200510: Since Python 2.4 released in 2005-03, a new built-in
function sorted() was added. There's no mention of it at the doc page
of the sort() method.
Addendum, 2005-10
Here's further example of Python's extreme low quality of
documentation. In particular, what follows focuses on the bad writing
skill aspect, and comments on some language design and quality issues
of Python.
=46rom the Official Python documentation of the sort() method, at:
http://python.org/doc/2.4.2/lib/typesseq-mutable.html, Quote:
=C2=ABThe sort() method takes optional arguments for controlling the
comparisons.=C2=BB
It should be =E2=80=9Coptional parameter=E2=80=9D not =E2=80=9Coptional argu=
ment=E2=80=9D. Their
difference is that =E2=80=9Cparameter=E2=80=9D indicates the variable, while=
=E2=80=9Cargument=E2=80=9D indicates the actual value.
=C2=AB... for controlling the comparisons.=C2=BB
This is a bad writing caused by lack of understanding. No, it doesn't
=E2=80=9Ccontrol the comparison=E2=80=9D. The proper way to say it is that =
=E2=80=9Cthe
comparison function specifies an order=E2=80=9D.
=C2=ABThe sort() and reverse() methods modify the list in place for
economy of space when sorting or reversing a large list. To remind you
that they operate by side effect, they don't return the sorted or
reversed list. =C2=BB
This is a example of tech-geeking drivel. The sort() and reverse()
methods are just the way they are. Their design and behavior are
really not for some economy or remind programers of something. The
Python doc is bulked with these irrelevant drivels. These littered
inanities dragged down the whole quality and effectiveness of the doc.
=C2=ABChanged in version 2.4: Support for key and reverse was added.=C2=
=BB
=C2=ABIn general, the key and reverse conversion processes are much
faster than specifying an equivalent cmp function. This is because cmp
is called multiple times for each list element while key and reverse
touch each element only once.=C2=BB
When sorting something, one needs to specify a order. The easiest way
is to simply list all the elements as a sequence. That way, their
order is clearly laid out. However, this is in general not feasible
and impractical. Therefore, we devised a mathematically condensed way
to specify the order, by defining a function f(x,y) that can take any
two elements and tell us which one comes first. This, is the gist of
sorting a list in any programing language.
The ordering function, being a mathematically condensed way of
specifying the order, has some constraints. For example, the function
should not tell us x < y and y < x. (For a complete list of these
constraints, see http://xahlee.org/perl-python/sort_list.html )
With this ordering function, it is all sort needed to sort a list.
Anything more is interface complexity.
The optional parameters =E2=80=9Ckey=E2=80=9D and =E2=80=9Creverse=E2=80=9D =
in Python's sort method is
a interface complexity. What happened here is that a compiler
optimization problem is evaded by moving it into the language syntax
for programers to worry about. If the programer does not use the =E2=80=9Cke=
y=E2=80=9D
syntax when sorting a large matrix (provided that he knew in advance
of the list to be sorted or the ordering function), then he is
penalized by a severe inefficiency by a order of magnitude of
execution time.
This situation, of moving compiler problems to the syntax surface is
common in imperative languages.
=C2=ABChanged in version 2.3: Support for None as an equivalent to
omitting cmp was added.=C2=BB
This is a epitome of catering towards morons. =E2=80=9CmyList.sort()=E2=80=
=9D is
perfect but Pythoners had to add =E2=80=9CmyList.sort(None)=E2=80=9D interfa=
ce
complexity just because idiots need it.
The motivation here is simple: a explicit =E2=80=9CNone=E2=80=9D gives codin=
g monkeys
a direct sensory input of the fact that =E2=80=9Cthere is no comparison
function=E2=80=9D. This is like the double negative in black English =E2=80=
=9CI ain't
no gonna do it!=E2=80=9D. Logically, =E2=80=9CNone=E2=80=9D is not even corr=
ect and leads to
bad thinking. What really should be stated in the doc, is that =E2=80=9Cthe
default ordering function to sort() is the =E2=80=98cmp=E2=80=99 function.=
=E2=80=9D.
=C2=ABStarting with Python 2.3, the sort() method is guaranteed to be
stable. A sort is stable if it guarantees not to change the relative
order of elements that compare equal -- this is helpful for sorting in
multiple passes (for example, sort by department, then by salary
grade).=C2=BB
One is quite surprised to read this. For about a decade of a
language's existence, its sort functionality is not smart enough to
preserve order?? A sort that preserves original order isn't something
difficult to implement. What we have here is sloppiness and poor
quality common in OpenSource projects.
Also note the extreme low quality of the writing. It employs the
jargon =E2=80=9Cstable sort=E2=80=9D then proceed to explain what it is, the=
n in
trying to illustrate the situation, it throws =E2=80=9Cmultiple passes=E2=80=
=9D and
the mysterious =E2=80=9Cby department, by salary=E2=80=9D.
Here's a suggested rewrite: =E2=80=9CSince Python 2.3, the result of sort() =
no
longer rearrange elements where the comparison function returns 0.=E2=80=9D
Xah
xah@xahlee.org
=E2=88=91 http://xahlee.org/
=E2=98=84
------------------------------
Date: Wed, 30 Apr 2008 03:13:04 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Python's doc problems: sort
Message-Id: <9pof14t22rpq24219q0an2748i5f054qr4@4ax.com>
"xahlee@gmail.com" <xahlee@gmail.com> wrote:
Is this self-promoting maniac still going at it?
>Although i disliked Perl very much [...]
Then why on earth do you bother polluting this NG?
Back into the killfile you go
jue
------------------------------
Date: Tue, 29 Apr 2008 21:26:31 -0700 (PDT)
From: George Sakkis <george.sakkis@gmail.com>
Subject: Re: Python's doc problems: sort
Message-Id: <88273bc8-5152-4dfd-9f96-1d6ee2b83f99@e53g2000hsa.googlegroups.com>
On Apr 29, 11:13=A0pm, J=FCrgen Exner <jurge...@hotmail.com> wrote:
> "xah...@gmail.com" <xah...@gmail.com> wrote:
>
> Is this self-promoting maniac still going at it?
>
> >Although i disliked Perl very much [...]
>
> Then why on earth do you bother polluting this NG?
>
> Back into the killfile you go
>
> jue
\|||/
(o o)
,----ooO--(_)-------.
| Please |
| don't feed the |
| TROLL's ! |
'--------------Ooo--'
|__|__|
|| ||
ooO Ooo
------------------------------
Date: Tue, 29 Apr 2008 18:21:12 -0700 (PDT)
From: s9uzaa@gmail.com
Subject: Read 20 lines when pressing n for next
Message-Id: <37b9eb38-e188-4dc2-b3a7-5f09cc3b81ea@a70g2000hsh.googlegroups.com>
Hi,
I would like to write a perl script with the following criteria match.
1. open any text file taken the name from the command line.
2. read top 20 lines and stops, then
3. ask to press letter "n or p" (for next/previous) to print next or
previous 20 lines.
would appreciate any kind of help.
4. must have subroutine used.
thanks
------------------------------
Date: Wed, 30 Apr 2008 01:48:05 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Read 20 lines when pressing n for next
Message-Id: <3kjf14pg37k144vjegm5q29f44to4t7hrj@4ax.com>
s9uzaa@gmail.com wrote:
>I would like to write a perl script with the following criteria match.
>1. open any text file
perldoc -f open
>taken the name from the command line.
perldoc perlvar and check for '@ARGV'
>2. read top 20 lines and stops, then
perldoc perlsyn and check for 'for'. However given the next requirement
the algorithm becomes a lot easier if you slurp in the whole file into
an array. If you read 20 line chunks then you need to seek forward and
backward all the time which is a real pain. In an array you just move
your current index.
>3. ask to press letter "n or p" (for next/previous)
perldoc -q single
>to print next or previous 20 lines.
> would appreciate any kind of help.
Maybe you should ask your tutor/teacher?
>4. must have subroutine used.
perldoc perlsub
jue
------------------------------
Date: Wed, 30 Apr 2008 01:48:54 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Read 20 lines when pressing n for next
Message-Id: <Xns9A8FDDEA2BC50asu1cornelledu@127.0.0.1>
s9uzaa@gmail.com wrote in news:37b9eb38-e188-4dc2-b3a7-
5f09cc3b81ea@a70g2000hsh.googlegroups.com:
> I would like to write a perl script with the following criteria match.
Give it a shot. Then post any questions you might encounter (please read
the posting guidelines first).
> 1. open any text file taken the name from the command line.
> 2. read top 20 lines and stops, then
> 3. ask to press letter "n or p" (for next/previous) to print next or
> previous 20 lines.
> would appreciate any kind of help.
> 4. must have subroutine used.
Look up $. in perldoc perlvar
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Wed, 30 Apr 2008 16:05:05 +0800
From: "Ela" <ela@yantai.org>
Subject: What's wrong with transparency by GD?
Message-Id: <fv997l$7so$1@ijustice.itsc.cuhk.edu.hk>
After testing different parameters, I'm still unable to obtain 2 transparent
circles. Could anybody tell me what's wrong in the following codes?
#!/usr/bin/perl
use GD;
$im = new GD::Image(550,450);
$white = $im->colorAllocate(255,255,255);
$black = $im->colorAllocate(0,0,0);
$red = $im->colorAllocateAlpha(255,0,0,119);
$blue = $im->colorAllocateAlpha(0,0,255,119);
$im->transparent($white);
$im->alphaBlending(1);
$im->setStyle($black);
$im->filledArc(460,380,95,75,0,360,$red);
$im->filledArc(500,380,95,75,0,360,$blue);
open(IMG, ">test.png");
binmode IMG;
print IMG $im->png;
close IMG;
------------------------------
Date: Wed, 30 Apr 2008 10:51:30 +0100
From: "DaveN" <DaveN@DaveN.COM>
Subject: Re: Windows mail.
Message-Id: <CiXRj.76110$Ka7.64781@newsfe30.ams2>
"l v" <veatchla@yahoo.com> wrote in message
news:reqdnTimB80H94rVnZ2dnUVZ_uWdnZ2d@supernews.com...
> DaveN wrote:
>> "l v" <veatchla@yahoo.com> wrote in message
>> news:NcGdnW-51_ewEovVnZ2dnUVZ_hadnZ2d@supernews.com...
>>> DaveN wrote:
>>>> Hi.
>>>>
>>>> Does anyone have example scripts to work with Windows Mail and in
>>>> particular
>>>> with usenet groups? I want to build a spam filter to run on all the
>>>> groups
>>>> I am subscribed to.
>>>>
>>> Don't write your own when one already exists.
>>>
>>> http://www.nfilter.org/
>>>
>>> --
>>>
>>> Len
>>
>>
>> Tried that, struggled to get it to work. Maybe not compatible with
>> Vista! :-(
>>
>
> According to rec.photo.digital posts (subject: Help please filtering
> google groups) nfilter/newsfilter is compatible with Vista.
>
> see http://preview.tinyurl.com/3zo7uu
>
> --
>
I decided to try it again and found useful information in
news.software.readers. The main problem seems to be a bad self extracting
zip file which can be overcome by renaming with a .zip extension. The other
thing is to setup the correct security rights on the configuration and user
files so that vista allows nfilter to work correctly.
Appears now to be doing something so just need to test a few filters.
--
DaveN
------------------------------
Date: Tue, 29 Apr 2008 22:49:46 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: WWW::Mechanize doesn't always follow_link(text
Message-Id: <pan.2008.04.29.20.49.45@rtij.nl.invlalid>
On Tue, 29 Apr 2008 12:59:56 +0200, Dr.Ruud wrote:
[ snip ]
You're right, I'm a bad reader.
M4
------------------------------
Date: Wed, 30 Apr 2008 10:43:17 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: WWW::Mechanize doesn't always follow_link(text
Message-Id: <fv9ihf.1hg.1@news.isolution.nl>
Martijn Lievaart schreef:
> Dr.Ruud:
> [ snip ]
> You're right, I'm a bad reader.
And I am sorry that I didn't write it clearer.
Have a Happy Queen's Day!
For me a good day to work on some pet projects. And clean the house.
I live near the Amsterdam Museumplein, so I expect loud music from wrong
bands all afternoon and evening.
http://www.koninginnedagamsterdam.nl/Radio-538-Museumplein_348.php
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
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 1494
***************************************