Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 PERL


  Perl Documentation in Terms of Tasks

The core Perl community—if you care to draw lines around a group ofpeople who use Perl seriously and call that a community—is like manyother core F/OSS communities. Real work happens on mailing lists and IRC. Iunsubscribed from several mailing lists and deliberately spent as little timeon IRC as possible this year, for various uninteresting reasons. (I haven'teven made it to the Portland Perl Mongersmeetings for several months.)While that's been good for my productivity, it's also produced aninteresting s...

2,279 0       PROCESS PERL DOCUMENTATION


  A Perl Regular Expression That Matches Prime Numbers

perl -lne '(1x$_) =~ /^1?$|^(11+?)\1+$/ || print "$_ is prime"'Can you figure out how it works? I give an explanation below, but try to figure it out yourself. Here is what happens when you run it:$ perl -lne '(1x$_) =~ /^1?$|^(11+?)\1+$/ || print "$_ is prime"'122 is prime33 is prime455 is prime677 is prime89101111 is primeHere is how it works.First, the number is converted in its unary representation by (1x$_). For example, the number 5 gets converted into 1x5, which is 11111 (1 repeated 5 times.)Next, the unary string gets tested against the regular expression. If it matches, the number is ...

5,290 0       REGULAR EXPRESSION PERL REGEX PRIME NUMBER ONE LINE


  Writing API clients in Perl and Python

I recently released a couple of API clients for the Ge.tt file sharing service, one in Perl and one in Python. (I am just a fan of the service, not an employee or contractor.) I would judge myself an "intermediate" pythonista mostly due to inexperience. It's a culture shock coming from a background of CPAN. The old joke is that Perl is just a life support system for CPAN and that is arguably true, but I am here to tell you: you may not appreciate how good Perl hackers have it with respect to CPAN and the culture around documenting, packaging and testing distros once they're on CPAN.It's hard ...

4,952 0       PATTERN PYTHON API PERL API WRITING


  How to teach "Modern" Perl?

Since I started my Perl Tutorial series a couple of people commented on what and how I am teaching.Some people asked why did I show "open or die" and why not using autodie. Others recommended the use IO::All instead of open.Another complaint was the introduction of time and localtime instead of DateTime.While I was mostly writing parts of my regular training material these comments led me to think about it again. I wonder how to teach Perl in 2012?When I started to write the tutorial I still called it "modern perl tutorial" but now I mostly call it "Perl tutorial" and I am going to eliminate t...

3,457 0       PERL TEACH TRAINNING MODERN MODERN PERL


  Helping people find good Perl tutorials

If a co-worker comes to you and asks you: "I would like to learn Perl, where can I find a good Perl Tutorial?", I am sure your would have a few recommendations. If the same person did not know you she would have to type some search term in Google and hope she found the right learning material.Recently Christian Walde (Mithaldu) asked "How do newbies find Perl learning materials online?". Dave Cross responded by checking the top results when searching for "perl tutorial".It shows that many people using Google to find a Perl tutorial will find bad ones.To which Mithaldu replied with a long ...

2,133 0       WEBSITE PERL PERL TUTORIAL RESOURCE