Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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.


In reply to Re: Why Perl? by davido
in thread Why Perl? by Preceptor

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (4)
    As of 2017-11-25 12:33 GMT
    Find Nodes?
      Voting Booth?
      In order to be able to say "I know Perl", you must have:

      Results (355 votes). Check out past polls.