Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

(Ovid) Re: Perl advocacy

by Ovid (Cardinal)
on Jun 16, 2001 at 01:14 UTC ( [id://88942]=note: print w/replies, xml ) Need Help??


in reply to Perl advocacy

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://88942]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-04-19 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found