Search code examples
regexperl

Questions every good Perl developer should be able to answer


Inspired by the original thread and the up and coming clones, here's one for the Perl community.

What are questions a good Perl programmer should be able to respond to?


Solution

  • Questions

    • What is a reference?
    • How does Perl implement object orientation?
    • How does Perl's object orientation differ from other languages like C# and Java?
    • Traditional object orientation in core Perl has largely been superseded by what?
      • Why?
    • What is the difference between a package and a module?
    • What features were implemented in 5.10?
    • What is a Schwartzian transform?
    • Explain the difference between these lines of code and the values of the variables.

      my $a = (4, 5, 6);
      my @a = (4, 5, 6);
      my $b = 4, 5, 6;
      my $c = @a;
      
    • What are some of Perl's greatest strengths?

    • What are some of Perl's greatest weaknesses?
    • Name several hallmarks of the "modern Perl" movement.
    • What does the binding operator do?
    • What does the flip-flop operator do?
    • What is the difference between for and foreach?
    • What makes Perl difficult to parse?
    • What are prototypes?
    • What is AUTOLOAD?
    • What is the Perl motto?
      • Why is this a problem?
    • What does use strict; do? Why is it useful?
    • What does the following block of code do?

      print (3 + 4) * 2;
      

    Tests

    • Implement grep using map.
    • Implement and use a dispatch table.
    • Given a block of text, replace a word in that block with the return value of a function that takes that word as an argument.
    • Implement a module, including documentation compatible with perldoc.
    • Slurp a file.
    • Draw a table that illustrates Perl's concept of truthiness.