Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Hi Bharani!

I will talk about what I think is so cool about Perl. But first, my questions to you are: What kinds of computer problems are you trying to solve? What other languages do you know?

If you are a business major, I would recommend learning how to make Excel and Word "sit down and bark", which means learning BASIC. The macro facilities of these programs use a form of BASIC which you can use to create spreadsheets of amazing features and complexity. I have even seen very nice "point and click" GUI user interfaces implemented as a spreadsheet!

There is no single programming language that is "the answer" to all problems. I write code in a number of languages: Perl, Perl, C, C++, Java, Python, Assembly, low level micro-code (the "raw hardware" language that assembly instructions are implemented in) and roughly in that order. Perl appearing twice at the beginning is not a typo!

Perl excels at a number of things, including (but certainly not limited to): anything to do with processing text, the web or dealing with an SQL Database.

For text processing, what are called "regular expressions" (like wild cards on steroids) are implemented directly as part of the Perl language. Accessing a database is of course possible in say C or Java, but there will be a whole page of verbose code that is only a few lines in Perl.

Two of the most common errors in programming are: "off by one errors" when iterating using indices in a loop and memory leaks (a piece of physical memory just essentially disappears never to be used or seen from again - in C++ this is an extremely common error). Perl has iterators and a memory management scheme so that usually these are not problems.

Perl is "large language" with a lot of functions. I would not recommend Perl as a "first language". It is so flexible and so capable that it is hard for beginners to figure out what the right "subset" of the language to use for a particular situation.

I find that functional Perl will run at maybe 1/3 the speed of C, but I can write the Perl code 5-10x faster. OO Perl has maybe an additional 30% performance penalty. For the vast, vast majority of my programming, being able to produce a correct solution quickly is much, much more important than the speed at which the code runs. When more performance is needed, I can tweak the Perl code to make it "good enough" or change algorithms rather than switching to C.

PerlMonks is an excellent place to ask detailed questions. If you can find an organized class for beginners to take, that is a good way to get started. Perl requires a bit more "how to" guidance than just learning what the various functions do.

I wish you well! PS: I guess Perl should be spelled in all caps, PERL like FORTRAN, they are both acronyms. But I am lazy when I type. Update: I guess that is not right, re:eyepopslikeamosquito's post. Perl it is.

In reply to Re: Why learn Perl? by Marshall
in thread Why learn Perl? by BHARANI KRISHNAN

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2023-12-07 23:52 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (33 votes). Check out past polls.