<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Mar 6, 2011, at 0:07 , Robert Nesius wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Sun, Mar 6, 2011 at 12:01 AM, r j <span dir="ltr"><<a href="mailto:ronsmailbox5@gmail.com">ronsmailbox5@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
I am really enjoying learning Perl right now and I love the array and list operators.<br>After using python for a while I am finding its not so hard to say there is more than one way to do it.<br>The ease in making a list of elements is cool (1...100);<br>
and using @ to make a list @giant = 1...1e5;<br>The generate word list it nice as well gw< this list of words ><br>Cool :D<br>What are some of your favourite language elements to get work done ?<br>,Ron <br><br></blockquote>
<div><br>Hi Ron, <br><br>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. <br>
<br>"Ten years of Perl man. That shit rots your brain." <br><br>As someone who also spent 10 years+ maintaining perl distros and debuggin legacy perl scripts, I have no option but to agree. <br><br>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. <br>
<br>-Rob (who is migrating from Perl to Ruby, with an eye on Python as a possible end-game beyond Ruby). <br></div></div></blockquote></div><br><div>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 <i>can</i> 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.</div><div><br></div><div>That said, Perl makes it a <b>lot</b> 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.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Another thing is POD. <a href="http://perldoc.perl.org/perlpod.html">http://perldoc.perl.org/perlpod.html</a> 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.</div><div><br></div><div>Also, get a copy of Perl Best Practices now and read through it. It'll help you out a lot in the long run.</div><div><br></div><div>-A</div><div><br></div></body></html>