Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

> A read of perl philosophy is surely worth, but if they are already programmers then ModernPerl is the right book.

Oh yes, strongly agree. Especially given the pupil is already an experienced programmer. chromatic explains why Modern Perl is so short (see also the excellent reply by xdg):

Modern Perl assumes you're already decent at programming, so it elides some basic stuff in favor of explaining how Perl works from philosophy to programming in the large. Learning Perl assumes you've never programmed before, so it spends more time on the basics, covers less of the language, and doesn't explore the philosophy of Perl in as much detail.

Modern Perl also tends to be kept more up to date with the latest version of Perl than Programming Perl, say.

Depending on your pupil, it might also be worth emphasizing the difference between Readability and Maintainability.

Not sure if you're planning on mentioning TMTOWTDI or TIMTOWTDIBSCINABTE but I noticed when playing code golf that Python often out-TMTOWTDI'ed Perl! :)

Update: Regular expressions are built into the language in Perl, while in Python they're provided by the re module -- this makes a massive difference in terms of convenience and ease of use, so you'll probably find yourself reaching for a regex solution more often in Perl than Python (especially if you're tybalt89 ;-).

Another key point that should be carefully explained in your course is Perl's unusual use of context, especially scalar vs list context.

Further update: Autovivification is yet another Perl quirk -- see "Emulation in other programming languages section" for one way to emulate it in Python. See also: Re^2: Honest question about Perl, Python and Ruby (autovivification), which shows how I emulated it in Ruby.


In reply to Re^2: Perl tutorial building on Python skills? by eyepopslikeamosquito
in thread Perl tutorial building on Python skills? by LanX

Title:
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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-03-28 20:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found