Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What constitutes effective Perl training for non-Perl developers? [closed]

Tags:

I've been working with Perl long enough that many of its idiosyncracies have become second nature to me. When new programmers join our group, they frequently have little to no experience with Perl, and it's usually my task to train them (to the extent necessary). I'd like to know what to focus on when training a programmer who is new to Perl but has experience with other languages (this question is meant to be language-agnostic, but most developers I've worked with have come from Java).

A few things occur to me:

  • The proper use of sigils
  • Referencing/Dereferencing
  • Use of list functions like map, grep, sort

Is there anything in particular that you've found it useful to focus on when helping a programmer to transition to Perl? Do you stress the similarities or the differences, or both in equal measure?

like image 426
Adam Bellaire Avatar asked Sep 26 '08 20:09

Adam Bellaire


People also ask

Do people still use Perl language?

In 2020, it's easy to write off Perl as a language whose heyday has passed. But the reality is that, more than thirty years after its first release, Perl remains not only alive but still evolving (hello Perl 7!).

Why is Perl still used?

Perl is not going away even if it tends to be less trendy than other modern languages. It is used in production codebases of many companies, for tasks as diverse as web development, databases access, log analysis or web crawling. It is a core component of most unix-like systems.

Is Perl good for web development?

Perl is still well suited for developing modern web apps. The language grows more powerful and easier to use every year, the available libraries are wonderful and keep getting better, and the inventions and discoveries available in modern Perl are unsurpassed.

Is Perl hard to learn?

Is Perl difficult to learn? No, Perl is easy to start learning --and easy to keep learning. It looks like most programming languages you're likely to have experience with, so if you've ever written a C program, an awk script, a shell script, or even a BASIC program, you're already partway there.


1 Answers

Check out the tables of contents for my books. Both Learning Perl and Intermediate Perl are designed to teach programmers the Perl language. We cover the 80% of Perl that most people use all of the time and developed that from years and years of teaching people Perl. Each book is designed as a tutorial, and there are exercises at the end of each chapter. I've also written the Learning Perl Student Workbook to provide additional exercises. Programming Perl is a good reference, too.

There are actually very few rules that you need to know to "get" Perl, and most people don't get these rules right just by looking at code. Some things to teach new Perlers who are coming from another language:

  • strict and warnings
  • Scalar versus list context
  • dynamic versus lexical scope
  • The sigil is not the variable type
  • List creation and manipulation (map, grep, sort)
  • How to use CPAN effectively
  • Closures and subroutines as data
  • Recursion in Perl sucks

Good luck :)

like image 146
brian d foy Avatar answered Sep 22 '22 02:09

brian d foy