Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://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.


Dave


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

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-03-19 03:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found