On Mar 6, 2011, at 0:07 , Robert Nesius wrote:

> 
> 
> On Sun, Mar 6, 2011 at 12:01 AM, r j <ronsmailbox5 at gmail.com> wrote:
> I am really enjoying learning Perl right now and I love the array and list operators.
> After using python for a while I am finding its not so hard to say there is more than one way to do it.
> The ease in making a list of  elements is cool (1...100);
> and using @ to make a list @giant = 1...1e5;
> The generate word list it nice as well gw< this list of words >
> Cool :D
> What are some of your favourite language elements to get work done ?
> ,Ron 
> 
> 
> Hi Ron, 
> 
> On the one hand I applaud your ability to step outside of Python and appreciate something different.  On the other hand here's what a friend of mine had to say about Perl after developing in it for 10+ years and then finally moving to Python.  
> 
> "Ten years of Perl man.  That shit rots your brain."  
> 
> As someone who also spent 10 years+ maintaining perl distros and debuggin legacy perl scripts, I have no option but to agree.  
> 
> Enjoy your time with Perl, but .... don't deploy anything into production if you don't have to.  Those who come after you and maintain your code will thank you for it. 
> 
> -Rob (who is migrating from Perl to Ruby, with an eye on Python as a possible end-game beyond Ruby).  

As someone who writes production both Perl and Python code professionally (10+ years), this is one of the biggest things I see and disagree with on a normal basis.  You can make very clean looking Perl code.  Perl Tidy helps with this a lot, and forcing people to use a post-modern object system like Moose provides helps even more.  Add in a requirement that everyone runs perltidy and perlcritic before they perform a check-in and you've got some code that you can show to Mom.  I've actually seen cleaner Perl code than Python code on a frequent basis.

That said, Perl makes it a lot easier to make really ugly looking code.  There are many Perl programmers I've met over the years who seem to think they know more than Chronic and Conway when it comes to best practices and that's both frustrating and unprofessional.  In my experiences Legacy code is riddled with this, but running it through perltidy usually helps when you've got to maintain something.

It really boils down to the standards and practices you or your company implements.  If you're using Perl for system administration tasks only, well I think all bets are off unless you police yourself.  If you're using it for an actual application using a framework like Catalyst though, I know from experience its easy to make the code clean and readable.

Back to Ron's question.  My favorite element of Perl is CPAN and the maturity of the packages these days.  You can find some excellent modules out there, such as the Moose Post-Modern Object System, Catalyst, and pretty much anything else you'll ever need.

Another thing is POD.  http://perldoc.perl.org/perlpod.html  This is one of the best documentation formats I've ever used as its simple to write and does the job well the first time.

Also, get a copy of Perl Best Practices now and read through it.  It'll help you out a lot in the long run.

-A

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20110306/85336a79/attachment.html>