Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Why Perl?

by davido (Archbishop)
on Jul 17, 2013 at 19:08 UTC ( #1044875=note: print w/replies, xml ) Need Help??

in reply to Why Perl?

Because you can.....

# do really useful things in a few lines of code # using a "baby" subset of the language.

The implementation of "really useful things in a few lines of code using a 'baby' subset of the language" is left as an exercise for the demonstrator. ;)

Seriously, the best way to get someone into Perl isn't to tout its undeniable superiority to other alternatives. Doing that will raise the defenses of those who already feel their preference is the "one true language." The best way is to take some task you do every day, and solve it with Perl code while leveraging Perl's strengths and avoiding its more advanced capabilities. If you can do that using core modules, fantastic. If you need a CPAN module, your discussion will need to start by showing the simplicity with which CPAN modules can be installed.

Here's an outline:

  • Every day I found myself needing to ________________, so I decided to automate it using Perl.
  • I needed This::Whizzbang::Module, so I typed cpan install This::Whizzbang::Module.
  • I also needed These::Other::Modules, and they were part of the standard core Perl distribution.
  • First I created a code framework to start with; it looked like:
    #!/usr/bin/env perl use strict; use warnings; use Some::Core::Modules; use My::Whizzbang::CPAN::Module; ...
  • Then I connected the dots with the following code...
  • Now I relax on the white sandy beaches of Palawan while my 15 line script does my work for me, logs it to a logfile, and emails me when there's a problem (because all scripts eventually evolve to the point of sending email).
  • Thank you... Questions?

As questions come up, use them as an opportunity to segue into topics like the CPAN smoke testers, Perl's committment to backward compatibility, Perl's leading role in advancing pattern matching techniques, concise syntax capable of rich expression, and so forth. Let those topics "come up" rather than forcing them upon Pythonistas. ;)

Throughout the discussion, suggest that you actually enjoy other languages too; that you might have done this using XYZ language, but that the module your using already did most of the work for you; that a shell script might have been adequate, but that Perl provides testing tools that helped you to gain a confidence that your code was correct, etc. When people raise opinions that they might have done this using Ruby, Python, C, etc., "Yes, that might be a nice approach also. I'm just demonstrating how simple it is with Perl. I suspect your implementation take a similar course regardless of the language."

This type of approach worked fairly well when I had to address a Unix user's group once, where we seemed to start off on the wrong foot as one trouble-maker wanted to just scoff at Perl. By the end, his disdain seemed to be more under control, and everyone else seemed to be genuinely interested.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1044875]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2017-12-14 18:18 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (401 votes). Check out past polls.