[26841] in Perl-Users-Digest
Perl-Users Digest, Issue: 8866 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 19 03:05:25 2006
Date: Thu, 19 Jan 2006 00:05:04 -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 Thu, 19 Jan 2006 Volume: 10 Number: 8866
Today's topics:
[ANNOUNCE] Emacs modules for Perl programming (Jari Aalto+mail.perl)
Re: limiting a loop to 100 <abigail@abigail.nl>
Re: limiting a loop to 100 <abigail@abigail.nl>
Re: Netiquette aspect <tadmc@augustmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 19 Jan 2006 06:15:46 GMT
From: <jari.aalto@poboxes.com> (Jari Aalto+mail.perl)
Subject: [ANNOUNCE] Emacs modules for Perl programming
Message-Id: <perl-faq/emacs-lisp-modules_1137651294@rtfm.mit.edu>
Archive-name: perl-faq/emacs-lisp-modules
Posting-Frequency: 2 times a month
Maintainer: Jari Aalto A T cante net
Announcement: "What Emacs lisp modules can help with programming Perl"
Preface
Emacs is your friend if you have to do anything comcerning software
development: It offers plug-in modules, written in Emacs lisp
(elisp) language, that makes all your programmings wishes come
true. Please introduce yourself to Emacs and your programming era
will get a new light.
Where to find Emacs/XEmacs
o Unix:
http://www.gnu.org/software/emacs/emacs.html
http://www.xemacs.org/
o Unix Windows port (for Unix die-hards):
install http://www.cygwin.com/ which includes native Emacs 21.x.
and XEmacs port
o Pure Native Windows port
http://www.gnu.org/software/emacs/windows/ntemacs.html
ftp://ftp.xemacs.org/pub/xemacs/windows/setup.exe
o More Emacs resources at
http://tiny-tools.sourceforge.net/ => Emacs resource page
Emacs Perl Modules
Cperl -- Perl programming mode
http://math.berkeley.edu/~ilya/software/emacs/
by Ilya Zakharevich
CPerl is major mode for editing perl files. Also included in
latest Emacs, but newest version is at Ilya's site. Note that
the directrory at CPAN is out of date:
http://www.cpan.org/modules/by-authors/id/ILYAZ/cperl-mode/
Compared to default `perl-mode' that comes with Emacs, this
one has more features.
TinyPerl -- Perl related utilities
http://tiny-tools.sourceforge.net/
If you ever wonder how to deal with Perl POD pages or how to find
documentation from all perl manpages, this package is for you.
Couple of keystrokes and all the documentaion is in your hands.
o Instant function help: See documentation of `shift', `pop'...
o Show Perl manual pages in *pod* buffer
o Grep through all Perl manpages (.pod)
o Follow POD references e.g. [perlre] to next pod with RETURN
o Coloured pod pages with `font-lock'
o Separate `tiperl-pod-view-mode' for jumping topics and pages
forward and backward in *pod* buffer.
o Update `$VERSION' variable with YYYY.MMDD on save.
o Load source code into Emacs, like Devel::DProf.pm
o Prepare script (version numbering) and Upload it to PAUSE
o Generate autoload STUBS (Devel::SelfStubber) for you
Perl Module (.pm)
TinyIgrep -- Perl Code browsing and easy grepping
[TinyIgrep is included in Tiny Tools Kit]
To grep from all installed Perl modules, define database to
TinyIgrep. There is example file emacs-rc-tinyigrep.el that shows
how to set up dattabases for Perl5, Perl4 whatever you have
installed
TinyIgrep calls Igrep.el to to do the search, You can adjust
recursive grep options, set search case sensitivity, add user grep
options etc.
You can find latest `igrep.el' module at
<http://groups.google.com/groups?group=gnu.emacs.sources> The
maintainer is Jefin Rodgers <kevinr@ihs.com>.
TinyCompile -- To Browse grep results in Emacs *compile* buffer
TinyCompile is a minor mode for *compile* buffer from where
you can collapse unwanted lines or shorten file URLs:
/asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file1:NNN: MATCHED TEXT
/asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file2:NNN: MATCHED TEXT
-->
cd /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/
file1:NNN: MATCHED TEXT
file1:NNN: MATCHED TEXT
End
------------------------------
Date: 19 Jan 2006 01:28:03 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: limiting a loop to 100
Message-Id: <slrndstqp3.1iu.abigail@alexandra.abigail.nl>
John Bokma (john@castleamber.com) wrote on MMMMDXXIII September MCMXCIII
in <URL:news:Xns974FA5A1CAC57castleamber@130.133.1.4>:
{} Mark <Mark.Fenbers@noaa.gov> wrote:
{}
{} > $c = 0;
{} > foreach (keys %myhash) {
{} > last if $c++ >= 100;
{} > # do stuff
{} > }
{} >
{} > But this seems clunky to me. I am curious as to whether there is a more
{} > elegant way (or "trick"), such as something like this:
{}
{} my @todo = keys %myhash;
{} @todo = splice @keys, 0, 100;
If %myhash is large, that may require a lot of extra memory.
I'd write it as:
for (my $i = 100; $i -- && (my ($k, $v) = each %myhash); ) {
# do stuff
}
Abigail
--
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))
------------------------------
Date: 19 Jan 2006 01:29:21 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: limiting a loop to 100
Message-Id: <slrndstqrh.1iu.abigail@alexandra.abigail.nl>
Glenn Jackman (xx087@freenet.carleton.ca) wrote on MMMMDXXIII September
MCMXCIII in <URL:news:slrndstfhl.j8f.xx087@smeagol.ncf.ca>:
[] At 2006-01-18 04:49PM, Mark <Mark.Fenbers@noaa.gov> wrote:
[] > My hash table can be quite large in certain situations, and so I need to
[] > modify the loop such that it only iterates only 100 times. Can I limit
[] > it cleverly? I know I can do it by keeping a counter, like so:
[] >
[] > $c = 0;
[] > foreach (keys %myhash) {
[] > last if $c++ >= 100;
[]
[] Perhaps:
[] foreach ((keys %myhash)[0..99]) {
[] # do stuff
[] }
That doesn't too well if %myhash happens to contain less than 100 elements.
Abigail
--
$_ = "\x3C\x3C\x45\x4F\x54" and s/<<EOT/<<EOT/e and print;
Just another Perl Hacker
EOT
------------------------------
Date: Wed, 18 Jan 2006 21:13:22 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Netiquette aspect
Message-Id: <slrndsu0ui.77v.tadmc@magna.augustmail.com>
John Bokma <john@castleamber.com> wrote:
> And very important: people repeating the same/similar answer(s) over and
> over again
people repeating the same/similar answer(s) over and over again
> (me included)
me too.
SCNR :-)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 8866
***************************************