[25212] in Perl-Users-Digest
Perl-Users Digest, Issue: 7457 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 28 06:06:04 2004
Date: Sun, 28 Nov 2004 03:05:05 -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, 28 Nov 2004 Volume: 10 Number: 7457
Today's topics:
Re: 500 Can't connect to search.cpan.org:80 (Bad protoc <wyzelli@yahoo.com>
Re: 500 Can't connect to search.cpan.org:80 (Bad protoc <see@sig.invalid>
Re: Dat files help "Att James" hope@hope.com
export to excel (ocap)
FAQ 2.13: Perl on the Net: FTP and WWW Access <comdog@panix.com>
FAQ 8.4: How do I print something out in color? <comdog@panix.com>
Re: Help: making images with perl? <nospam@bigpond.com>
Re: Is assigning to $#ar most efficient? xhoster@gmail.com
Re: making images with perl? (krakle)
Re: Matt's formail not working outside domain <spamtrap@dot-app.org>
Re: Matt's formail not working outside domain <wyzelli@yahoo.com>
newbie question. Please help! <lhao@NOSPAMcomcast.net>
Re: sorting objects with "sort" and subroutine (Jay Eckles)
Re: Transiting from Perl: Learn Python or Ruby? <spamtrap@dot-app.org>
Re: Transiting from Perl: Learn Python or Ruby? <karlUNDERSCOREkramsch@yahooPERIODcom.invalid>
Re: Transiting from Perl: Learn Python or Ruby? xhoster@gmail.com
Re: Transiting from Perl: Learn Python or Ruby? <karlUNDERSCOREkramsch@yahooPERIODcom.invalid>
Re: Transiting from Perl: Learn Python or Ruby? <karlUNDERSCOREkramsch@yahooPERIODcom.invalid>
Re: Transiting from Perl: Learn Python or Ruby? <spamtrap@dot-app.org>
Re: Transiting from Perl: Learn Python or Ruby? <karlUNDERSCOREkramsch@yahooPERIODcom.invalid>
Re: Transiting from Perl: Learn Python or Ruby? <tassilo.von.parseval@rwth-aachen.de>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 28 Nov 2004 05:18:53 GMT
From: "Peter Wyzl" <wyzelli@yahoo.com>
Subject: Re: 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.plline 24.
Message-Id: <1ddqd.50921$K7.21927@news-server.bigpond.net.au>
"Bob Walton" <see@sig.invalid> wrote in message
news:41a95acb$1_4@127.0.0.1...
: Nirvana wrote:
: ...
: > $ENV{"SYSTEMROOT"} = "C:/WINDOWS/system32";
: ...
: > I'm getting following error:
: > 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.pl
: > line 24.
: >
: > Any help ?
: >
:
: Not sure why, but removing the bogus environment variable setting makes
: it work on my system. Somewhere in the bowels of LWP, it must refer to
: some Windoze component that needs a valid setting for the SYSTEMROOT
: environment variable. I'm not sure why you'd want to mess with that one
: anyway -- but I'm pretty sure it will have to have genuine backslashes
: in it if Windoze is looking at it.
Generally not, though with an environment variable I don't know.
command.com and cmd.exe both understand / as well as \ for directory
seperators.
It's probably worth noting that systemroot is normally set to c:\windows NOY
c:\windows\system32 (being the root of the system tree not a directory
within it)
--
Wyzelli
------------------------------
Date: Sun, 28 Nov 2004 00:08:26 -0500
From: Bob Walton <see@sig.invalid>
Subject: Re: 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.plline 24.
Message-Id: <41a95acb$1_4@127.0.0.1>
Nirvana wrote:
...
> $ENV{"SYSTEMROOT"} = "C:/WINDOWS/system32";
...
> I'm getting following error:
> 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.pl
> line 24.
>
> Any help ?
>
Not sure why, but removing the bogus environment variable setting makes
it work on my system. Somewhere in the bowels of LWP, it must refer to
some Windoze component that needs a valid setting for the SYSTEMROOT
environment variable. I'm not sure why you'd want to mess with that one
anyway -- but I'm pretty sure it will have to have genuine backslashes
in it if Windoze is looking at it.
--
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl
------------------------------
Date: Sat, 27 Nov 2004 23:14:58 GMT
From: hope@hope.com
Subject: Re: Dat files help "Att James"
Message-Id: <qe2iq05rs9scunli8f5on249f8cqsi5v03@4ax.com>
On Sat, 27 Nov 2004 13:39:59 -0600, Tad McClellan <tadmc@augustmail.com>
wrote:
Hi Tad
Ok I give up on this I'm just going round in circles
Two things
1.........How much would you charge to do this for me
2... Or can you put me in touch with some one who can give me a price to
do it
You can email me direct if you like
buildxp@hotmail.com
I thank you for trying to put me on the right track and after hrs of
reading and taking you advice I'm a bit further on But still a long way
to go
Regards
John
>> So now it has gone and looked in that folder and found all files with a
>> extension of .dat pull the information out of them and put it in a
>> variable called $fname
>
>
>Wrong.
>
>I wouldn't call it "fname" if it contained file _contents_.
>
>$fname is the file_name_ of one of the .dat files.
>
>
>> Then once it is in the variable I can do what I want with it.
>
>
>You get one line from the file into $_, then you can do whatever
>you want with that line.
------------------------------
Date: 28 Nov 2004 01:02:54 -0800
From: ocap8891@yahoo.it (ocap)
Subject: export to excel
Message-Id: <c4495e9e.0411280102.3e882960@posting.google.com>
I would like write to Excel file the result of a query on a db table
with a CGI Perl. My CGI allows output to HTML table by Template.pm
module; can you help me?
With Java it's very easy
response.setContentType("application/vnd.ms-excel")
But with Perl? In the same script I want allow output in html and
output in excel file (user choices). Can I do it using Template.pm
module?
Hi
ocap
------------------------------
Date: Sun, 28 Nov 2004 05:03:01 +0000 (UTC)
From: PerlFAQ Server <comdog@panix.com>
Subject: FAQ 2.13: Perl on the Net: FTP and WWW Access
Message-Id: <cobm65$iko$1@reader1.panix.com>
This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with Perl.
--------------------------------------------------------------------
2.13: Perl on the Net: FTP and WWW Access
To get the best performance, pick a site from the list at
http://www.cpan.org/SITES.html . From there you can find the quickest
site for you.
You may also use xx.cpan.org where "xx" is the 2-letter country code for
your domain; e.g. Australia would use au.cpan.org. [Note: This only
applies to countries that host at least one mirror.]
--------------------------------------------------------------------
Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short. They represent an important
part of the Usenet tradition. They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.
If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile. If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.
Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release. It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.
The perlfaq manual page contains the following copyright notice.
AUTHOR AND COPYRIGHT
Copyright (c) 1997-2002 Tom Christiansen and Nathan
Torkington, and other contributors as noted. All rights
reserved.
This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.
------------------------------
Date: Sun, 28 Nov 2004 11:03:01 +0000 (UTC)
From: PerlFAQ Server <comdog@panix.com>
Subject: FAQ 8.4: How do I print something out in color?
Message-Id: <cocb95$nqq$1@reader1.panix.com>
This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with Perl.
--------------------------------------------------------------------
8.4: How do I print something out in color?
In general, you don't, because you don't know whether the recipient has
a color-aware display device. If you know that they have an ANSI
terminal that understands color, you can use the Term::ANSIColor module
from CPAN:
use Term::ANSIColor;
print color("red"), "Stop!\n", color("reset");
print color("green"), "Go!\n", color("reset");
Or like this:
use Term::ANSIColor qw(:constants);
print RED, "Stop!\n", RESET;
print GREEN, "Go!\n", RESET;
--------------------------------------------------------------------
Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short. They represent an important
part of the Usenet tradition. They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.
If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile. If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.
Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release. It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.
The perlfaq manual page contains the following copyright notice.
AUTHOR AND COPYRIGHT
Copyright (c) 1997-2002 Tom Christiansen and Nathan
Torkington, and other contributors as noted. All rights
reserved.
This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.
------------------------------
Date: Sun, 28 Nov 2004 14:31:02 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: Help: making images with perl?
Message-Id: <30t2k6F3276j8U1@uni-berlin.de>
Giancarlo wrote:
> Hello,
>
> I am able to program a little bit in perl and I can write cgi's that
> make HTML pages whose content depend on the inputs of the visitors.
> But that's all what I am able to do: I am not expert at all.
>
> At this time I need to write a perl cgi that makes simple geometrical
> images (they are very simple and may be black/white). I wonder how I
> can do this in perl.
> Actually I am able to do this in a very stupid way, that is: I have a
> 1 pixel white bmp file, and a 1 pixel black bmp file, and then I run a
> perl cgi that makes a HTML page (!) placing side by side these images,
> depending on the figure I need to build. For example:
> <img src = white.bmp><img src = black.bmp><img src = white.bmp><img
> src = white.bmp> and so on... and <br> at the end of the first row of
> pixels.
> Actually it works: the real imagine appears into the browser! It is
> made of thousands of 1-pixel bmp files (white.bmp and black.bmp) that
> are placed side by side.
> I understand that this is a stupid way, but I am not able to do better
> than this, due to my ignorance.
>
Use the GD module (easy), or possibly ImageMagick (harder).
http://stein.cshl.org/WWW/software/GD/
gtoomey
------------------------------
Date: 28 Nov 2004 00:20:48 GMT
From: xhoster@gmail.com
Subject: Re: Is assigning to $#ar most efficient?
Message-Id: <20041127192048.270$7Q@newsreader.com>
Polleke <rev_1318@hotmail.com> wrote:
> on Thursday 25 November 2004 12:07, Jonas Nilsson wrote:
>
> > The most efficient way to shorten an array is that to assign to $#ar?
> > /jN
>
> a small comparison between various options gives:
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
> use Benchmark ':all';
>
> cmpthese(10000, {
> '$#' => sub { my @array = (1..1000); $#array = 9 },
> 'assign' => sub { my @array = (1..1000); @array = @array[0..9] },
> 'undef' => sub { my @array = (1..1000); @array[10..10000] = (undef)
> x 990 },
> 'delete' => sub { my @array = (1..1000); delete @array[10..1000] },
> 'splice' => sub { my @array = (1..1000); splice(@array, 0, 10) },
> });
Not all of these do the same thing. "undef" is doubly wrong, as it goes
to 10,000 rather than 1,000 and doesn't reduce the size of the
array. (add "@array==10 or die" to the end of your subs.)
Your version of splice also doesn't leave @array==10. You want
splice @array, 10
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 27 Nov 2004 18:36:42 -0800
From: krakle@visto.com (krakle)
Subject: Re: making images with perl?
Message-Id: <237aaff8.0411271836.70b8605f@posting.google.com>
> "Giancarlo" <amor99@iname.com> wrote in message
> news:dbfb676.0411270629.22309a55@posting.google.com...
> > [asks how to do graphics with cgi]
GD (Generic but for some gets the job done nicely).
Image Magick - Powerful graphics library.
Gimp - ditto.
My favorite is Image::Magick. It can be installed from CPAN or PPM.
------------------------------
Date: Sat, 27 Nov 2004 18:55:23 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Matt's formail not working outside domain
Message-Id: <BLqdnbl8Fq1xjjTcRVn-qQ@adelphia.com>
Michele Dondi wrote:
> Matt himself is now redirecting people to better replacements which
> IIRC are available at <http://mms.sourceforge.net>
Typo. That should be <http://nms.sourceforge.net>.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Sun, 28 Nov 2004 05:08:09 GMT
From: "Peter Wyzl" <wyzelli@yahoo.com>
Subject: Re: Matt's formail not working outside domain
Message-Id: <Z2dqd.50912$K7.19021@news-server.bigpond.net.au>
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message
news:Xns95AEB1B72D74Casu1cornelledu@132.236.56.8...
: mortgageloan2004@aol.com (Mortgageloan2004) wrote in
: news:20041127143648.21945.00001339@mb-m06.aol.com:
:
: > I have READ all his documentation carefully.
:
: No one cares.
:
: > Why isn't this working?
:
: Your problem, not ours.
True. You seem to have an entirely different problem.
--
Wyzelli
------------------------------
Date: Sun, 28 Nov 2004 06:53:39 GMT
From: "L. Hao" <lhao@NOSPAMcomcast.net>
Subject: newbie question. Please help!
Message-Id: <SBeqd.108661$5K2.58365@attbi_s03>
Hello, I am new to Perl. What I am trying to do is to get and parse the
result of a system function execution. But I am not sure how to do it.
The system function is the file comparison, cmp, i.e.
system(" cmp -xl $file1 $file2") && die "failed"
If the file1 and file2 are not identical, cmp returns the detailed
differences by bytes. What do I need to do to get this results and parse
them in Perl? To be specific about parsing, I'd like to get the index of
differences.
Thanks a lot.
Li
------------------------------
Date: 27 Nov 2004 15:06:26 -0800
From: j.eckles@computer.org (Jay Eckles)
Subject: Re: sorting objects with "sort" and subroutine
Message-Id: <f98fc400.0411271506.4d913ec7@posting.google.com>
Andrew Tkachenko <and11@rol.ru> wrote in message news:<coaj5o$jnl$1@news.rol.ru>...
> because $a, $ba variables produced by 'sort' are in global namespace.
> Access them as $main::a and $main::b.
That did the trick. Thanks!
Jay
------------------------------
Date: Sat, 27 Nov 2004 18:52:30 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Transiting from Perl: Learn Python or Ruby?
Message-Id: <BLqdnb58Fq2ijjTcRVn-qQ@adelphia.com>
Goh, Yong Kwang wrote:
> contemplating FTP upload feature. Hence it has grown from a 100 lines
> script to 700+ lines file. In a way, it has outgrown Perl, which seems
> to be getting less suitable for it. Making it object-oriented seems to
> be the solution to the overly long and complex program.
OO is a good solution, yes. But, in what way does that preclude the use
of Perl?
> But Perl's approach to OO is making the program messy and hard to read
> as well
Some developers choose to make their code messy and hard to read. Others
choose to make it clear and easy to read. Perl leaves that choice up to you.
> using a lot of arcane manipulation of @ISA
Arcane? "our @ISA=qw(SuperClass);" is "arcane"? News to me...
> and shift and unshift for methods' parameters
Unshift for parameters? That's a new one. If you don't like shift(),
don't use it.
my ($self, $foo, $bar) = @_;
> clever but hard-to-read references for class variables.
Why would you need references to use class variables? They're just
ordinary variables scoped to the package with "our".
Or are you speaking of instance variables? If so, I don't agree - how is
"$self->{foo}" difficult to read? Is it the braces? If so, write an
accessor method and use that instead - "$self->foo". Accessors are a
good idea anyway.
If you don't like writing accessor methods by hand, have a look through
CPAN - there are modules to automate the process.
> It's support for OO looks more of clever hack and
> a temporary ugly workaround rather than a consistent, clean and
> elegant syntax for OO. I know this sounds offensive to Perl fans out
> there but just my personal opinion, I may be wrong.
I don't find it offensive, although I do think you're wrong. You're free
to write consistent, clean, and elegant OO in Perl if you want. If
there's something stopping you from doing so, it's not the language.
> syntax is its strength. But for larger program which demands code to
> be easily comprehensible and clean, Perl's flexibility becomes its
> liability.
I disagree. Perl is perfectly capable of parsing clean, comprehensible
code - the question is whether you are capable of writing such code.
> Therefore, I'm contemplating learning a new language, either Python or
> Ruby, which promise cleaner and consistent syntax. So just seeking
> opinion from experienced Perl programmers and developers here on which
> would be a better choice for an existing Perl programmer and program
> and why.
All of 'em. Seriously, why limit yourself? Learn as many langauges as
you can - the more you know, the better equipped you'll be to choose the
right one for any given task.
If you look at learning new languages as an unpleasant chore, perhaps
you should seriously consider whether you've chosen the right
profession. Keeping your skills up to date and learning new languages is
part of the territory. Programming is a *perfect* example of the "Red
Queen Dilemma" - you have to run as hard as you can, just to stay in the
same place.
One last thing - have a look at Bricolage, at <http://bricolage.cc> for
your content management. It's huge - 'wc -l' on .pm files reports over
164000 lines of Perl, and that's not even counting the dozens of CPAN
modules it uses. You're entitled to your opinion that Perl is unsuitable
for large applications, but it's a fact that people are quite
successfully using it for exactly that.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Sun, 28 Nov 2004 01:54:33 +0000 (UTC)
From: KKramsch <karlUNDERSCOREkramsch@yahooPERIODcom.invalid>
Subject: Re: Transiting from Perl: Learn Python or Ruby?
Message-Id: <cobb4p$ffj$1@reader1.panix.com>
In <BLqdnb58Fq2ijjTcRVn-qQ@adelphia.com> Sherm Pendley <spamtrap@dot-app.org> writes:
>I disagree. Perl is perfectly capable of parsing clean, comprehensible
>code - the question is whether you are capable of writing such code.
Oh, there's more to it than that. As a Perl programmer I often
have to read other people's Perl code, and I have no control over
how others choose to code. Whoever claims that one can be an
effective Perl program without often having to read other people's
Perl code is just lying. Just yesterday I spent many thankless
hours reading the source of SOAP::Lite, to make up for big holes
in the documentation. Not a fun time. My labmate switched from
Perl to Python because he got tired of reading other people's Perl
code; it had nothing to do with his ability to write clean Perl.
Irrespective of whether it is *possible* to write clean readable
Perl (of course it is), the fact is that Perl is exceptional in
the huge number of ways in which it can be obfuscated. There's
more than one side to TMTOWTDI. On top of that, despite all the
lip service for clear coding, the Perl culture just as often promotes
the opposite, by being very appreciative of cleverly impenetrable
hacks. I learned my first obscure Perl hacks, such as
select((select,$|=1)[0]), from the Camel book and the widely popular
Obfuscated Perl contests. I've seen very little of this sort of
thing in the Python world (I don't know anything about the Ruby
culture).
Karl
--
Sent from a spam-bucket account; I check it once in a blue moon. If
you still want to e-mail me, cut out the extension from my address,
and make the obvious substitutions on what's left.
------------------------------
Date: 28 Nov 2004 02:05:55 GMT
From: xhoster@gmail.com
Subject: Re: Transiting from Perl: Learn Python or Ruby?
Message-Id: <20041127210555.994$KG@newsreader.com>
KKramsch <karlUNDERSCOREkramsch@yahooPERIODcom.invalid> wrote:
> In <BLqdnb58Fq2ijjTcRVn-qQ@adelphia.com> Sherm Pendley
> <spamtrap@dot-app.org> writes:
>
> >I disagree. Perl is perfectly capable of parsing clean, comprehensible
> >code - the question is whether you are capable of writing such code.
>
> Oh, there's more to it than that. As a Perl programmer I often
> have to read other people's Perl code, and I have no control over
> how others choose to code. Whoever claims that one can be an
> effective Perl program without often having to read other people's
> Perl code is just lying. Just yesterday I spent many thankless
> hours reading the source of SOAP::Lite, to make up for big holes
> in the documentation. Not a fun time. My labmate switched from
> Perl to Python because he got tired of reading other people's Perl
> code;
Does reading other people's Perl code somehow get easier once you start
coding in Python?
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Sun, 28 Nov 2004 02:21:15 +0000 (UTC)
From: KKramsch <karlUNDERSCOREkramsch@yahooPERIODcom.invalid>
Subject: Re: Transiting from Perl: Learn Python or Ruby?
Message-Id: <cobcmr$frq$1@reader1.panix.com>
In <20041127210555.994$KG@newsreader.com> xhoster@gmail.com writes:
>KKramsch <karlUNDERSCOREkramsch@yahooPERIODcom.invalid> wrote:
>> In <BLqdnb58Fq2ijjTcRVn-qQ@adelphia.com> Sherm Pendley
>> <spamtrap@dot-app.org> writes:
>>
>> >I disagree. Perl is perfectly capable of parsing clean, comprehensible
>> >code - the question is whether you are capable of writing such code.
>>
>> Oh, there's more to it than that. As a Perl programmer I often
>> have to read other people's Perl code, and I have no control over
>> how others choose to code. Whoever claims that one can be an
>> effective Perl program without often having to read other people's
>> Perl code is just lying. Just yesterday I spent many thankless
>> hours reading the source of SOAP::Lite, to make up for big holes
>> in the documentation. Not a fun time. My labmate switched from
>> Perl to Python because he got tired of reading other people's Perl
>> code;
>Does reading other people's Perl code somehow get easier once you start
>coding in Python?
No, it's just easier to avoid it.
Karl
--
Sent from a spam-bucket account; I check it once in a blue moon. If
you still want to e-mail me, cut out the extension from my address,
and make the obvious substitutions on what's left.
------------------------------
Date: Sun, 28 Nov 2004 03:10:12 +0000 (UTC)
From: KKramsch <karlUNDERSCOREkramsch@yahooPERIODcom.invalid>
Subject: Re: Transiting from Perl: Learn Python or Ruby?
Message-Id: <cobfik$gl8$1@reader1.panix.com>
In <cobb4p$ffj$1@reader1.panix.com> KKramsch <karlUNDERSCOREkramsch@yahooPERIODcom.invalid> writes:
>select((select,$|=1)[0])
select((select(FH),$|=1)[0]), that is.
Or select+(select(FH),$|=1)[0] if it's Perl golf.
Karl
--
Sent from a spam-bucket account; I check it once in a blue moon. If
you still want to e-mail me, cut out the extension from my address,
and make the obvious substitutions on what's left.
------------------------------
Date: Sun, 28 Nov 2004 00:03:14 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Transiting from Perl: Learn Python or Ruby?
Message-Id: <EYadnSkYJdeOwTTcRVn-1Q@adelphia.com>
KKramsch wrote:
> Oh, there's more to it than that. As a Perl programmer I often
> have to read other people's Perl code, and I have no control over
> how others choose to code.
What's your point? That's true of any language. The blame lies with the
sloppy coder, not the language he happens to be using.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Sun, 28 Nov 2004 06:57:13 +0000 (UTC)
From: KKramsch <karlUNDERSCOREkramsch@yahooPERIODcom.invalid>
Subject: Re: Transiting from Perl: Learn Python or Ruby?
Message-Id: <cobss9$k9p$1@reader1.panix.com>
In <EYadnSkYJdeOwTTcRVn-1Q@adelphia.com> Sherm Pendley <spamtrap@dot-app.org> writes:
>KKramsch wrote:
>> Oh, there's more to it than that. As a Perl programmer I often
>> have to read other people's Perl code, and I have no control over
>> how others choose to code.
>What's your point?
My point is that in my experience, and that of others I know, it
is much easier to run across impenetrable Perl code than impenetrable
Python or C code, say. Perl has a reputation for obscurity, and
this reputation doesn't come out of *nowhere*. The fact that it
is *possible* to write clear code in Perl doesn't negate that
there's an exceptionally large amount of unreadable Perl out there.
One can blame this fact on "bad/sloppy programmers" until the cows
come home, but this won't make it go away. Given that as a programmer
one will have to read the code for the libraries one uses (since
the documentation is often incomplete), it makes sense to stay
clear of a language that has a reputation for obscurity. I personally
like programming in Perl, but I definitely understand the view of
programmers, like my labmate, who can't stand reading other people's
Perl code.
Karl
--
Sent from a spam-bucket account; I check it once in a blue moon. If
you still want to e-mail me, cut out the extension from my address,
and make the obvious substitutions on what's left.
------------------------------
Date: Sun, 28 Nov 2004 09:41:09 +0100
From: "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de>
Subject: Re: Transiting from Perl: Learn Python or Ruby?
Message-Id: <slrncqj3p5.2r7.tassilo.von.parseval@localhost.localdomain>
Also sprach KKramsch:
> In <EYadnSkYJdeOwTTcRVn-1Q@adelphia.com> Sherm Pendley <spamtrap@dot-app.org> writes:
>
>>KKramsch wrote:
>
>>> Oh, there's more to it than that. As a Perl programmer I often
>>> have to read other people's Perl code, and I have no control over
>>> how others choose to code.
>
>>What's your point?
>
> My point is that in my experience, and that of others I know, it
> is much easier to run across impenetrable Perl code than impenetrable
> Python or C code, say. Perl has a reputation for obscurity, and
> this reputation doesn't come out of *nowhere*.
It arose from a misunderstanding: People see the syntax of a language
and make judgements based solely on that. What they fail to see is that
syntax is on the surface. The big picture of a piece of software cannot
be grasped by looking locally.
So Python looks appealing to you? Well, learn it, try to understand some
largish projects implemented in Python and come back. Just as Perl (and
certainly any language), it has flaws. As it happens, the Pythonic flaws
can be a real spoiler when it comes to large projects in particular. It
has quite a few inconsistencies, too. This is something that comes as a
surprise to many people learning it because they mostly judged it based
on its cleaner-looking syntax. But that is treacherous and deceptive.
Ruby on the other hand is quite a different beast. With a Perl
background, it's fairly easy to pick up. In many ways it ressembles
Perl. The superficial programmer will see with delight that its syntax
is less intimidating than that of Perl. On the surface, it ressembles
Python, structurally however it's much closer to Perl. In that, it
avoids most of Python's serious shortcomings for
programming-in-the-large.
Stil, best is to have a look at both of them. I am fairly sure that
once you know Perl, Python and Ruby, only two of them will survive. It's
not going to be Python. :-)
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
------------------------------
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 7457
***************************************