Quote:
Originally Posted by
unclecameron
1. Is there anything bash will do that perl won't?
Perl can do everything BASH can do a lot faster. Perl can also do many things which BASH cannot, e.g. connect to a legion of RDBMS implementations seemlessly with DBI, and support full OO application development.
Quote:
Originally Posted by
unclecameron
2. How steep is the learning curve?
Many feel it is quite sharp. This is a good place to start:
Amazon.com: Learning Perl, 5th Edition (9780596520106): Randal Schwartz, Tom Phoenix, brian d foy: Books
Quote:
Originally Posted by
unclecameron
3. If perl's more powerful, why?
1. Perl's has stronger standard data types, excellent support for references and complex data structures, a rich set of built-in functions and superb support for regular expressions.
2. Perl is much faster than BASH ( but then, so is almost everything else. Time how long it takes both to count to 500,000,000, or to compute a factorial ).
3. Perl has unparalleled 3rd party support with external libraries available from CPAN ( the Comprehensive Perl Archive Network ). For Instance, want to encrypt something with the Whirlpool algorithm? Just use Digest::Whirlpool right out of the box. You would not be so lucky in BASH, Python, or PHP. i.e. you'd be implementing the algorithm on your own.
There are 115 modules in the Digest:: space and 409 modules in Crypt:: compare that to PHP PEAR for instance. It's not even close.
Quote:
Originally Posted by
unclecameron
4. I've built a small app in python, which seemed nice, isn't there a wider support depth (i.e. example code, # of users)in perl than python?
Compare CPAN to Python's
Python Package Index : PyPI and you are likely to find CPAN superior. Python really does not have a community-accepted one-stop-shop for all serious 3rd-Party Modules. PHP Pear is much more serious, but it still fails in comparison to CPAN. Knowledge of the pre-existing code on CPAN can make writting applications in Perl Geometrically faster, even without a framework.
Frameworks are where Perl has been weak ( compare, Python Django, Ruby on Rails, or PHP Zend ), until the advent of Catalyst which is a fully featured Perl MVC framework which is catching on very rapidly.
Combine CPAN and Catalyst, and you are really cooking with propane.
Quote:
Originally Posted by
unclecameron
5. I'm building mostly sysadmin scripts, if I were going to do more web integration (think php/javascript) with my code, would perl or python be easier to build, and which would be more powerful, or are they roughly the same?
Don't build sysadmin scripts in Python or PHP. Use Perl, BASH, awk, sed for those things.
For the Web PHP, Perl, and Python all have strengths and weakness. You could write a thesis on this topic and some do. I'll avoid that.
Summary: despite taking a lot of mostly undeserved guff, Perl remains an excellent choice for everything from one-line one-shot filesystem transforms to full-fledged MVC OO Web Applications.
If you can handle a steep learning curve and *symbolism*, e.g. $# instead of LAST_ELEMENT_IN_THE_ARRAY, Perl will serve you well for many years to come.
Hope That Helps.