• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Python or Perl

eakers

Lifer
I need to write a short, easy script that will involve a lot of regular expression work. I have kind of narrowed down to python or perl but I am not sure which to learn. I don't necessarily want to pick whatever is easier but rather which one will be the most useful down the road.

I have been all over the internet looking at what might be useful and I think I am wading into one religious issue after another. I am thinking of just taking the weekend and learning both and then deciding which I like better unless someone can give me some good reasons why I should pick one over the other.

Some background that might be helpful: C++ is my main programming language although I dabble in .NET and web programming of all kinds (PHP, ASP, ASP.NET etc).
 
Like you've said it doesn't matter which one you choose, both are plenty powerful for what you want to do. I would perhaps try a few small programs first and see which language is easier for you. I personally like Perl over Python for regular expression work 🙂
 
If you're familiar with PHP, Perl will be a breeze.

Plus, Perl is amazingly useful for all sorts of small (and large) odd jobs-- it's the duct tape of the programming world.
 
Originally posted by: QED
If you're familiar with PHP, Perl will be a breeze.

Plus, Perl is amazingly useful for all sorts of small (and large) odd jobs-- it's the double sided duct tape of the programming world.

fixed 😉
 
Thanks for the replies, after looking at some small tutorials I decided to go with Perl because of how similar it is to php (and the recommendations of this thread 😉). So far it has been a piece of cake to pick up but I am not doing anything difficult. Would you guys recommend getting a book to get into some of the more advanced topics or just stick with poking around the Internet? While I don't necessarily have a use for more advanced stuff right now, I'd like to know whats available.

Also, is it a good idea to venture down the path of object oriented Perl?
 
There are two iconic references that every true Perl hacker has read. They are the llama book and the camel book (as known by the animals on their covers).

The llama book is "Learning Perl", and is the book for actually learning Perl (as you can imagine).

The camel book is "Programming Perl", and is the more advanced reference written by Larry Wall (creator of Perl).
 
Back
Top