Viewing 12 posts - 1 through 12 (of 12 total)
  • Pearl or Python something else?
  • Earl
    Free Member

    Looking at investing a few hours to learning a new language – to a basic level only. Want to use it for some simple home sysadmin tasks ie batch renaming files, writing stuff to csv etc.

    Pearl or Python the way to go or something else?

    (Been programming a few years in a VB style language and know a bit of C)

    samuri
    Free Member

    Pearl then. Although if you're going to be doing it in a linux style environment you'd get equally good results with some shell programs.

    buzz-lightyear
    Free Member

    Both good with good library support and books.

    Perl syntax is a bit tricky to read until you get used to it. The implementation of object orientation is a bit forced IMO. But Perl is very powerful, fast etc, so I use it instead of Unix shell scripts.

    Python probably better for larger-scale programming IMO as it has a sweet syntax and nice OO.

    Earl
    Free Member

    Mainly win32 for me but I assume it will all be similar to unix – though I see most of the learning material leans towards unix.

    Will start with python for now as it looks easier to pick up.

    samuri
    Free Member

    you could try cygwin for your unix environment if you fancy having a look at that.

    coffeeking
    Free Member

    Python is a bit overkill for the sort of thing you want IMO.

    woody2000
    Full Member

    Why not use Windows Powershell if you're just doing home stuff?

    http://www.microsoft.com/technet/scriptcenter/scripts/msh/default.mspx?mfr=true

    joemarshall
    Free Member

    I've used both quite a lot. I'd always choose Python not Perl. The only reason I'd touch Perl is if I need to maintain someone else's code, or if I'm being paid specifically to use Perl.

    Python is very handy for that kind of thing, anything that is just a bit too complex to do easily with a batch file.

    Perl is an okay language, but is spoilt by the culture of developing in it, which is often about writing compact code, using various shortcuts or symbols, and it has loads of wacky syntax that is a nightmare to read, so people often don't write easy to understand code.

    Python forces you to write readable code, and much of it is pretty understandable even if you don't use Python much, which whilst it isn't everything, is a good start.

    They are both equally powerful nowadays, so it's mainly just about preferences & who/what you want to work with.

    Joe

    ScotlandTheScared
    Full Member

    Joe is talking sense. Python is way easier to learn because the syntax is clearer. Perl programmers go for speed and therefore it is often very difficult to read their code if you are a beginner. Sure python is not as fast as perl, but its great for loads of stuff – and its plenty fast enough for simple operations.

    STS.

    ScotlandTheScared
    Full Member

    Python is also entertaining since the tutorials use Monty Python to aid the enjoyment of learning 🙂

    GaryLake
    Free Member

    Perl was one of the first languages I learnt, and it didn't do me any harm – I ended up doing Java/JSP and C#/ASP.NET before realising I didn't want to programme for a living anymore.

    Just because the people are bad, doesn't mean the language is. If it's only for home tasks you won't need to endure others' code anyway.

    O'Reily – Learning Perl was quite good for getting the basics.

    Learning any language is never wasted time – a lot of the skills are transferable and once you get three languages or so under your belt you slowly become quite language independent.

    Whenever I do have to do some programming now, I just keep a book by my keyboard and start coding regardless of whether I previously know the language or not.

    Aidy
    Free Member

    Perl is an okay language, but is spoilt by the culture of developing in it, which is often about writing compact code, using various shortcuts or symbols, and it has loads of wacky syntax that is a nightmare to read, so people often don't write easy to understand code.

    That very much depends on the coder in question, and the purpose of said code.
    (I'll write code differently for production environments than I will to solve a quick puzzle for myself).

    It should be noted that a sufficiently good/bad (take your pick) coder can write obscure code in any language. Perl isn't really any better or worse for it, but it has a poorer reputation.

    Perl programmers go for speed and therefore it is often very difficult to read their code if you are a beginner.

    Do you really think that Perl coders are so fast with devising code that cutting down the amount of typing they do speeds up the process?

    If you're talking code execution speed, then well, you learn when to optimise and when not to.

    Perl's a very legible language when written right; one of the problems with this is that as a consequence, it can be fairly illegible when it's not.

    The thing people haven't mentioned is CPAN, which is really the core strength of Perl – vast amounts of code written by others, so that you don't have to.

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Pearl or Python something else?’ is closed to new replies.