A couple of thoughts:
- Drop the regex. It's practically unreadable and if any has heard of the FUD regarding Perl and linenoise, that will only encourage it.
- Go ahead and include the Amazon and eToys links. The odds are, many people who read your document will not follow your links.
- You mention that a company is thinking about adopting Perl as a development language. What sort of development? What are they trying to accomplish and how does Perl help them accomplish this? If they want device drivers or high-speed number crunching, Perl is not the best solution.
Incidentally, if you must include the regex, at least have pretty formatting so it looks nice:
$/ = ''; # paragrep mode
while (<>) {
while ( m{
\b # start at a word boundary (begin letters)
( # capture to $1
\S+ # one or more non-spaces
) # find chunk of non-whitespace
\b # until another word boundary (end letters)
( # capture to $2
\s+ # separated by some whitespace
\1 # whatever was in $1
\b # until another word boundary
)+ # one or more sets of those
}xig ) {
print "dup word '$1' at paragraph $.\n";
}
}
Just looking at that code, even when nicely formatted, makes me wince when I think about trying to convert anyone with it. Sure, we know what <>, $/, $., $1, and \1 mean, not to mention the /x, /i and /g modifiers on the regex, but those are going to scare the heck out of someone and make 'em long for Python or something.
If you show them some code, I think some 'baby Perl' would be a nice way to start.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
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, details, 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, summary, 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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.