Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

comment on

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

Wow -- what a nice topic.

Personally, I think that Perl is very suitable as a first language. Some reasons come to mind:

  • You don't have to trouble yourself with the difference between numbers, characters and strings (like e.g. in Java, Pascal, C)
  • Easy development environment -- a friend can just point you to a perl-highlighting editor and show you how to configure it to run perl. No need to learn a complex IDE. Plus short turn-around times.
  • Perl doesn't bug you with header files, libraries etc. (at least not in the beginning)
  • Type designations ($, @, %) help the beginner to remember what he is doing without having to learn Hungarian Notation ;-)
  • The human language considerations make easy perl quite understandable -- I think open or die is understood better than try {} catch{}, for example.
  • Perl's syntax is very complex -- but you only need a small subset to get going.
  • Perl has enough complexity to keep you going forever (unlike VB or Pascal)
  • There are a lot of applications -- Text manipulation, CGI etc. -- that help you to apply what you learn

In fact, the last point was the most important one for me. I got a perl book some years ago, but I started to do real programming only a few months after I got the book -- when I had a real CGI problem to solve. Of course, this is how we get all the insecure guestbooks etc., but hey, everybody starts out some time.

Beginners or not-so-advanced programmers might be freaked out by regular expressions, cryptish code, JAPHs etc. But you can actually learn the concept behing regexes very quickly (although it takes time to understand their limitations thoroughly!), and you can write good software in perl for years without using heavy syntactic sugar once.

Basically, perl allows you to choose the level where you want to be. Some people are comfortable at a more formal level. Others are more adventurous. Perl accomodates both.

All this leads me to the next question -- what would you consider good materials to teach beginners a usable subset of perl?

In reply to Re: Learning Perl as a First (programming) language by crenz
in thread Learning Perl as a First (programming) language by japhif

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 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? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2021-12-01 19:31 GMT
Find Nodes?
    Voting Booth?
    R or B?

    Results (14 votes). Check out past polls.