For web apps and database apps, I'd say PHP. PHP gets a bit of a bad reputation. For many coders it is the first language they learn, and often the only language they learn, so there's an awful lot of bad PHP code out there written by people with no formal training in programming. That's largely why it has a poor reputation.

But recent versions of PHP have had pretty good object-oriented programming support (its OO system is quite Java-like, supporting only single inheritance, with abstract classes and interfaces, and in the latest release candidates traits too), namespaces, a unified database interface (PDO). PHP supports Perl-compatible regular expressions. And PHP's syntax should be fairly familiar to Perl programmers, as its original designer was a Perl scripter. (IIRC PHP 1.0 was implemented in Perl, but newer versions are implemented in C.)

Weak points are the lack of an LWP::UserAgent equivalent (PHP has various different HTTP client libraries, but they're universally rubbish) and lack of something like CPAN (there is PEAR/PECL, but it it has a much smaller set of libraries available, and many are very poorly documented). Also, while there do exist some PHP extensions for desktop programming (e.g. PHP-GTK) they're not especially mature. PHP is not the language you want to use for desktop programming projects.

Python (like Perl) is a bit of an all-rounder. It's certainly suitable for web apps, database apps and desktop apps, though I find certain things about it quite infuriating. One factor that seems to irk a lot of people (including myself) is that whitespace is considered significant. An "if" block indented by 6 spaces might have a different meaning to an "if" block indented 4 characters, depending on the indentation of surrounding code.

Ruby is very Perl-like in many ways. However, it lacks Perl's breadth and maturity in libraries.

That said, a better learning experience might be to try learning some programming languages as un-Perl-like as possible. Once that use completely different programming paradigms. That way, when you come back to Perl, you can apply ideas you've learnt to your Perl programming. Learn a functional programming language like Haskell or Miranda; learn a declarative programming language like Prolog. Learning a very different language could help you become a much better Perl programmer.


In reply to Re: What language should I learn? by tobyink
in thread What language should I learn? by extrafied99

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.