Slashdot Mirror


The Road To Better Perl Programming: Chapter 4

Frank writes: "This series of articles on developerWorks comprises a complete guide to better programming in Perl. In this fourth installment, Teodor introduces functional programming and several essential Perl idioms important for Perl programmers looking for speed and elegance in their code, such as the map() and grep() functions, and the Schwartzian and Guttman-Rosler transforms."

2 of 9 comments (clear)

  1. Kind of weak by gizmo_mathboy · · Score: 2, Informative

    I wasn't sure if he teaching "intro to perl" or "intro to functional programming".

    It bugged me when he used map() in a void context (listing 3). It's even in the Perl FAQ that it's frowned upon.

    I would call the article "idiomatic perl" instead.

    1. Re:Kind of weak by pudge · · Score: 4, Informative
      It bugged me when he used map() in a void context (listing 3). It's even in the Perl FAQ that it's frowned upon.

      Perhaps it is, but the primary reason it is frowned upn is because map in a void context returned a list, so it was inefficient. That behavior's been changed; map in a void context is no longer a technical problem. Now it is merely a stylistic one.