Dave Horner's Website - Yet another perspective on things...
Home Tech Talk Programming PERL Programming
$$\cos x = \sum\limits_{n = 0}^\infty {\frac{{\left( { - 1} \right)^n x^{2n} }}{{\left( {2n} \right)!}}}$$

Who's Online

We have 72 guests online
Content View Hits : 1608550
moon and stars

PERL Programming

Wednesday, 04 May 2005 18:20
PERL is among my favorite languages. I find that everyone has a different style when writing code in it. It is powerful with a lot of available CPAN modules, this makes development easier. I've seen some pretty amazing scripts...and some pretty unreadable perl code...well unreadable until you understand the meaning and the context, which requires knowledge. So it goes.
The Perl motto TMTOWTDI, "There's More Than One Way To Do It" ,pronounced "tim toady". Is no myth in Perl.

JAPH - Just another perl hacker.

The Perl Programming Language - - home of Perl.
Perl & Linguistics - Larry Wall is the author of Perl. 1995/07/27 Re: Linguistics and Perl? comp.lang.perl.misc
Larry Wall - Wikiquote - Lisp has all the visual appeal of oatmeal with fingernail clippings mixed in.
PerlMonks - The Monastery Gates - my profile davehorner

Perl and Me, Part 3: A Møøse once bit my sister | Buddy Burden [] - The more experienced I get, the more abstractly I want to think about a problem. And my language better keep up. You can measure the really good ones (programmers) by how many lines per day they remove. And Moose helped me remove a metric shit-ton of code.
SIGSTP - on programming in Perl and other random bytes.

Perl 6

Perl 6 - go visit little Camelia. Feature comparison of Perl 6 compilers Official Perl 6 Documentation | Rakudo Perl 6
Pugs - pugscode - implementation of Perl 6, written in Haskell.Audrey Tang's Pugs Blog » Interview with Audrey Tang
6guts | Tales of Perl 6 guts hacking Jonathan Worthington :: Home
Perl Data Language - compactly store and speedily manipulate the large N-dimensional data arrays
jnthn/blizkost - Blizkost exposes Perl 5 in Parrot and make it accessible through the standard HLLCompiler interface. It does this by embedding Perl 5, and then building out from there.
The First Twenty-Five Years - The Perl Foundation - Perl is not re-inventing the wheel, more it looks at what works and what doesn't work and decides to implement it in a Perlish manner and hopefully a more code complete way.
Mythbusters – Why I (still) Love Perl « Allison Randal - a perl podcast for you! - blogging the onion
Perl Mongers - Perl User Groups.
John Bokma - Hacking and Hiking in Mexico
Cats and Code | by Oliver Gorwits
Planet Perl Iron Man
Hacking Thy Fearful Symmetry - Dancing the Haka - great perl related blog.
Five great Perl programming techniques to make your life fun again at Xaprb - map and grep, implement defaults with ||=,hash and array slices,executable regular expressions,dispatch tables of coderefs, oh my.
The perils of & (and prototypes too!) | Joel Berger [] - and a little clowning with the $".
Perl Tutorial Hub

perl5i - Fix as much of Perl 5 as possible in one pragma -
Perl 6 / Perl 6 - Perl 6 Advent Calendar | Something cool about Perl 6 every day
Modern Perl, by chromatic - Onyx Neon Press - great, up to date book...(2011-2012 draft)
This Perl goes to 11

Perl Distributions

Strawberry Perl for Windows - win32&win64 binary distro, perl, dmake,dmake install.
DWIM Perl - the Perl distribution that contains everything you'll ever need - based on strawberry perl.
camelbox - A build of Perl with Gtk+, packaged and ready for use on 32-bit Windows systems - Google Project Hosting

Padre, the Perl IDE - install Padre::Perl, uses wxWidgets, as such it is Scintilla and SciTE based.
Perl Circus - Perl Tricks, Tips And Traps.
Welcome to - tutorials,faqs,howtos.
perl Out of memory! (with solution) at Red Mercury Labs - remember ulimit...
Perl has no switch statements. How do I avoid a long if-else-if pattern? - hashes!
perldsc - - Perl Data Structures Cookbook, arrays of arrays, hashes of arrays,arrays of hashes, hashes of hashes, elaborate records.
Perl Programming - Wikibooks, collection of open-content textbooks - quick reference for common tasks:
perlop - - specifically the Quote-Like-Operators. - Perl 5 Internals - Part One
perlguts - - illustrated Reini Urban / illguts -

A nice function reference:
Perl Programming/Function Reference - Wikibooks, collection of open-content textbooks

Perl cmdline switches

Perl Switches 101 - -e and -n are my favorites.

CPAN Notes

Many times when you write PERL code, you want to use modules. These modules usually reside on the CPAN sites (The CPAN Search Site - To install them, find the module, download and install.
CPAN module reviews
CPAN Coverage report - created using Devel::Cover - Code coverage metrics for Perl - - Perl programming language
CPAN Testers Wiki - TestDuringInstall - become a CPAN Tester just by reading this and installing modules.

One nice utility I've found is the CPAN management shell.
Just run:
perl -MCPAN -e shell;
Then when you are inside the shell type:
install <module> (which could be something like MODULE::Name)

This will automatically download, unpack, and install the app. It will also grab any deps. that are needed when installing! Very nice indeed. :) For more information about it, search for: CPAN on the CPAN search.
Here's a single liner to install a module from the CLI.
perl -MCPAN -e 'install MODULE::ToInstall'

Also, if you for some reason need to reconfigure your CPAN options:

useful.things » Blog Archive » Perl CPAN reconfiguration - o conf init

upgrade all installed cpan modules

get yourself a drink, it might be a while. ppl are shipping code,doing work while you sleep.
cpan upgrade /(.*)/

Life with CPAN
App::cpanminus - - App::cpanminus - get, unpack, build and install modules from CPAN
CPAN dependencies and test results checker - using META.yml and META.json to work out deps, looking up modules, their deps and test results. Reverse lookup of modules using a dep is also possible.

Some really great PERL tutorials live here:
Perl Maven's - Perl tutorial - Gabor Szabo
Alex Batko :: Programming :: Perl
Sam Graham's website > Perlblog
Introduction to References
Arrays vs. Lists in Perl: What's the Difference? - in scalar context
How do I print a hash that has a hash within it?
Alister West - Perl ++Code Alister West - Web Dev Pipeline

CPAN wrong directory

I have had issues in the past when uninstalling and installing perl on machines with cpan using the wrong directory. If you find yourself with the same issue, try checking for a in your local directory. In windows, I found it in "Local Settings\Application Data\.cpan\CPAN\"

CPAN self hosting / DarkPAN / local CPAN module repo

Perl Node Interface: Install your own Perl with your own CPAN
- install CPAN::Mini,CPAN::Mini::Inject,CPAN::Mirror::Server::HTTP,CPAN::Mini::Webserver, minicpan,cpanmirrorhttpd --root $CPAN_ROOT
Pinto -
melezhik/jam smart pinto glue, a tool which enables automatic creation of perl applications distribution archives from source code using pinto. CLI and web api.

CPANci || continuous integration for CPAN

Nice way to start your perl file

#!/usr/bin/perl -Tw         # force taint checks, and print warnings
use strict;                 # install all three strictures
use warnings;               # print warnings
$|++;                       # force auto flush of output buffer

dos2unix/unix2dos in perl

perl -pi -e 's/\r\n/\n/;' *.ext #dos2unix
perl -pi -e 's/\n/\r\n/;' *.ext #unix2dos

teideal glic deisbhéalach » Blog Archive » Peruse popular Perl packages

Perl version 5.10.0 documentation - - where to go for docs on perl.
Examples in Perl
Data::Dumper::Concise -
Data::Printer - colored pretty-print of Perl data structures and objects - - Perl programming language - colored output, better than Data::Dumper.

create a hash from comma delimited list of name value pairs.

my %set_hash = map { split /=/ } split /,/, $setlist;

should PERL be considered a functional language?

Yes, Perl should be considered a functional language.
Higher-Order Perl - Higher-Order Perl is about functional programming techniques in Perl. It's about how to write functions that can modify and manufacture other functions.
Derivative Function as a Closure in Perl - Derivative Function From Calculus as a Closure in Perl

Perl and C++ || Perl and XS || Perl and C

Don't forget SWIG.
Perl and C++ - Perl XS (the Perl native glue) and C++
XS Mechanics XS Mechanics - Introduction XS Mechanics - Architecture

PERL IDE in Eclipse

EPIC - Eclipse Perl Integration - EPIC is an open source Perl IDE (including editor and debugger) based on the Eclipse platform, compatible with Windows, Linux and Mac OS X. (

PERL for file renaming

Recipe 9.9. Renaming Files
How to Bulk Rename Files in Linux (Terminal or GUI) | Webmaster Tips

array returned as undef

This made me take a double take. Try out the following:
my @array = undef;
if(@array) {
 print "defined\n";
} else { 
 print "undefined\n";
You will find that you get a defined value back! So when you return an array, returning undef does not make the returning @array undef. Instead, use the empty array ().

subroutine arguments with default values (@_)

sub bar{
    my %args = (
        # Set your defaults/doc your accepted args here
        aNiceandLongName => 'default'
        @_ # Passed-in args replace your defaults
bar( aNiceandLongName => 'woodchuck');
Perl named, self-documenting subroutine arguments with default values

Logging in perl

8 Useful Log::Log4perl Recipes
Log::Log4perl::FAQ - Frequently Asked Questions on Log::Log4perl
Smart Logging With Log4per (PPT) or google quickview - really great set of slides.
Debugging Perl DBI - gives quite a good intro on DBIx::log4perl.
MooseX::Log::Log4perl -

Email in perl

Sending Email with Perl Best Practice - I'll agree using MIME::Lite::TT::HTML is pretty awesome.

Random CPAN modules

FindBin - - module figures out where the script was invoked. useful for relative paths...
The home of asterisk-perl - A PERL module for Asterisk:
local::lib - - - create and use a local lib/ for perl modules with PERL5LIB
App::local::lib::helper::rationale -
Perlbrew - perlbrew is a admin-free perl installation management tool. Manage perl installations in your $HOME.
App::FatPacker - pack your dependencies onto your script file - -Perl Advent Calendar 2012 - Self-contained applications

Plack || PSGI

# from PSGI.pod
my $app = sub {
      my $env = shift;
      return [
          [ 'Content-Type' => 'text/plain' ],
          [ "Hello World" ], # or IO::Handle-like object
perl code ref, accepts hash returns array ['statuscode',[content-type:hash],[handle or content]]
PSGI/Plack - Perl Superglue for Web Frameworks and Web Servers
Catalyst Advent Calendar - Day 23 - Plack - A Fantastic Layer To Make Your App Deployment Easier
PSGI - - Perl programming language - PSGI - Perl Web Server Gateway Interface Specification
Plack Advent Calendar

Perl Web Frameworks

Meteor - perl web 2.0 http server
Web-Simple - A quick and easy way to build simple web applications -
jjn1056/Shutterstock-Guestbook-Web - GitHub - example web application using Web::Simple, Moo and HTML::Zoom.
mfontani/Brocco · GitHub - Blog engine written in Perl using Dancer DBIx::Class Text::MultiMarkdown DBIx::Class::Schema::Loader
HTML-Zoom - selector based streaming template engine - HTML::Zoom is the cure for JQuery envy.


Dancer - Perl Web Framework for easy and fun webapp development
Dancer::Cookbook - a quick-start guide to the Dancer web framework - - Perl programming language
Dancer::Deployment - common ways to put your Dancer app into use - - Perl programming language
Dancer::Plugin::Database - easy database connections for Dancer applications - - Perl programming language
berekuk/questhub -


Catalyst | Perl MVC web application framework - PERL MVC install Task::Catalyst
yanick/Galuga - GitHub - Galuga - Yet another blog engine (Catalyst)
Catalyst Advent Calendar
Catalyst::Plugin::AutoCRUD - Instant AJAX web front-end for DBIx::Class -
CatalystX::CRUD -
Using jqGrid with Catalyst: Tutorial with Examples for Newbies | j0e []
Using Catalyst::Controller::REST with jqGrid: Tutorial with Examples for Newbies | j0e []


Mojolicious - Perl real-time web framework
Writing websocket chat using Mojolicious::Lite · kraih/mojo Wiki · GitHub
Example applications · kraih/mojo Wiki · GitHub
Mojolicious::Guides::Cookbook - Cookbook
kraih/mojo · GitHub Home · kraih/mojo Wiki · GitHub
plu/github-meets-cpan · GitHub - The app is deployed to dotCloud and uses MongoDB for storing the data. The software is written in Perl using the Mojolicious framework.
tempire/MojoExample · GitHub - Mojolicious example with DBIx::Class schema load, deploy, fixtures, and tests.
Joel Berger []
jberger/Galileo · GitHub - Galileo is a Perl CMS written using Mojolicious, DBIx::Class, PageDown,Bootstrap,jQuery,HumaneJS,DBIx::Class::DeploymentHandler,Module::Build,jberger/Mojolicious-Plugin-InstallablePaths
Welcome to Contenticious - build web sites from markdown files - Contenticious
memowe/contenticious · GitHub - build web sites from markdown files
Mojolicious::Plugin::Mount - - a plugin that allows you to mount whole Mojolicious applications.
catz - The world's most advanced cat show photo engine - see what happens behind the scene! @ - the meowing revolution of cat show photos

issues I've found with Mojo,hypno,and mango

if you install EV on windows, morbo will crash telling you that "EV does not work with ithreads."
morbo startup failure on Windows 7 with Perl v5.14.2 built for MSWin32-x86-multi-thread · Issue #391 · kraih/mojo · GitHub - the solution is to "set MOJO_REACTOR=Mojo::IOLoop::Poll" which makes mojo not use EV for the event loop and instead uses a pure-Perl event loop that always works.

Looking at old code from github it looks like at one point mojo allowed the use of b() within templates. The code imports the Mojo::ByteStream module as 'b', but that doesn't flow through to the templates as it did?
Running example code I would get something like: Undefined subroutine &Mojo::Template::SandBox::b called at template
anyways, one solution as specified in the Mojo::Template docs, is to create a new Mojo::ByteSteam inline.
Replace b() with Mojo::ByteStream->new().

Sometimes I recieve a "Non-blocking operations in progress at Mango/" when hosting out of hypnotoad.
Non-blocking operations in progress at Mango/ - Google Search - show some others experiencing the trouble too.. The templer static-site generator - skx/templer - A static-site-generator, written in perl with per-page variables and layouts. Textile, Markdown, or plain HTML
skx/static-site-generators - A mini-review of static site generators from Templer's author.

Devel::Declare - Adding keywords to perl, in perl -

Dependency Injection || Inversion of Control in Perl || IoC in Perl

containers, and containers of containers providing services so your doesn't have to worry about it.
Bread::Board -
Bread::Board::Declare - create Bread::Board containers as normal Moose objects - - services declared as attributes.

Object Systems in Perl

package namespaces and subroutines, and you could bless anything to an object.
perlobj -
cpan> m /^M(?:o(?:o|[ou]se)?)?$/
Module < M Module < Mo Module < Moo Module < Moose Module = Mouse
Moose,Mouse (uses XS,faster),Any::Moose (uses Mouse unless Moose already loaded)
stevan/p5-mop - GitHub - Meta Object Protocol, or MOP, to be perhaps included in a future version of Perl 5.
Qore Programming Language - embeddable multi-threaded programming language.
Moose - A postmodern object system for Perl » Stevan Little on Moose
Jesse Luehrs / Moose -
Dave Rolsky / Moose - -Moose is a complete object system for Perl 5.
Call of the Moose - Moose blog
perl5i - Fix as much of Perl 5 as possible in one pragma -
Matt S Trout / Moo - - Moo - Minimalist Object Orientation (with Moose compatiblity)
Object::InsideOut - - support for implementing classes using the inside-out object model.
Object::InsideOut Quick Reference - Yani

DBIx || DBIx::Class || DBIC

Testing DBIx::Class Models without the Database - Modern Perl Books, a Modern Perl Blog
DBIx::Class — An ORM for Perl that is extensible and flexible
Hacking Thy Fearful Symmetry - DBIx::Class::DeploymentHandler is Awesome
Arthur Axel "fREW" Schmidt / DBIx-Class-DeploymentHandler -
DBIx::Class::Manual::DocMap -
DBIx::Class::Manual::Intro -
DBIx::Class::Manual::Cookbook -
DBIx::Custom -
DBIx::QueryLog - - Logging queries for DBI I want to full view the SQL that is run by DBI in DBIx :: QueryLog! - Perl Advent Calendar Japan 2011 Dbix Track
SQL::Interp - - Interpolate Perl variables into SQL statements SQL :: Interp - Yet Another Hackadelic
Introduction to DBIx::Lite - tech talk #2
Catalyst::Model::DBIC::Schema -
Catalyst Advent Calendar - Day 16 - Advanced Search in web DBIx::Class based applications (with tags, full text search and searching by location)

Unicode in Perl

Unicode: Good, Bad, & Ugly
Tom Christiansen’s Materials for OSCON 2011
Unicode::Tussle -
Unicode Perl Best Practices | ADAM JC TAYLOR

Perl v6

Perl 5 to Perl 6 - Arrays
perl5i - Fix as much of Perl 5 as possible in one pragma -
Perl 6 / Perl 6

packaging modules, dists, tasks, etc.

Building Perl projects with MakeMaker


Internals and C Language Interface
perlembed Perl ways to embed perl in your C or C++ application
perldebguts Perl debugging guts and tips
perlxstut Perl XS tutorial
perlxs Perl XS application programming interface
perlxstypemap Perl XS C/Perl type conversion tools
perlclib Internal replacements for standard C library functions
perlguts Perl internal functions for those doing extensions
perlcall Perl calling conventions from C
perlmroapi Perl method resolution plugin interface
perlreapi Perl regular expression plugin interface
perlreguts Perl regular expression engine internals
perlapi Perl API listing (autogenerated)
perlintern Perl internal functions (autogenerated)
perliol C API for Perl's implementation of IO in Layers
perlapio Perl internal IO abstraction interface
perlhack Perl hackers guide
perlsource Guide to the Perl source tree
perlinterp Overview of the Perl interpreter source and how it works
perlhacktut Walk through the creation of a simple C code patch
perlhacktips Tips for Perl core C code hacking
perlpolicy Perl development policies
perlrepository Using git with the Perl repository
perlobj - Perl object reference
perlfaq1 – General Questions About Perl
perlfaq2 – Obtaining and Learning about Perl
perlfaq3 – Programming Tools
perlfaq4 – Data Manipulation
perlfaq5 – Files and Formats
perlfaq6 – Regexes
perlfaq7 – General Language Issues
perlfaq8 – System Interaction
perlfaq9 – Networking

HTTP in perl

Simple http server one-liner for some static files?
App::HTTPThis - App::HTTPThis - Export the current directory over HTTP (using plack)
HTTP::Server::Brick - HTTP::Server::Brick - Simple pure perl http server for prototyping "in the style of" Ruby's WEBrick. using LWP.
miyagawa/Twiggy - AnyEvent based non-blocking PSGI web server (like Thin)

slaughter - The Slaughter System Administration & Automation Tool - skx/slaughter
The Definitive Slaughter Guide - skx/slaughter-book - The definitive slaughter guide
skx/slaughter-policies - slaughter policies skx uses on his hosts.


App::Cmd - write command line apps with less suffering -
Reverse CPAN dependencies: App-Cmd - list of cmdline apps using App::Cmd

Debug perl || step through perl code

Devel::hdb - Perl debugger as a web page and REST service -
How to use the debugger with Moose | Ovid [] - use DB::Skip - make the perl debugger skip statements in given packages or subs

Managing multiple perls

Acme Envy - oylenshpeegul's blog - the latest versions of Perl, Python, and Ruby at your disposal.
plenv, alternative for perlbrew - Tatsuhiko Miyagawa's blog
tokuhirom/plenv - plenv - perl binary manager

Perl module packaging tips and stuff

Adopt a CPAN module - The good, the bad, and the beautiful
How to make CPAN-like module
Git-CPAN-Patch-1.3.1 - Patch CPAN modules using Git - - Perl programming language
Distribution::Cooker - Create a module directory from your own templates - - Perl programming language
module-starter - creates a skeleton module distribution - - Perl programming language
Dist::Milla - Distribution builder, Opinionated but Unobtrusive - - Perl programming language - milla new Dist-Name;cd Dist-Name;milla build;milla release


ack, an awesome grep replacement.
Beyond grep: ack 2.08, a source code search tool for programmers - ack is simple to install, via CPAN.
Colorize log output with ack |

Testing in perl

Test::Tutorial - A tutorial about writing really basic tests -
Test::BDD::Cucumber::Manual::Tutorial - Quick Start Guide -


Perl::Critic - Some Ways Are Better Than Others (LOVE tag line)
Params::Validate - - Perl programming language - Validate method/function parameters

Performance in Perl

Dumbbench - More reliable benchmarking with the least amount of thinking - - Perl programming language
Coro -
Perl: Coro asynchronous
Introduction to Coro


Mason - Mason - Powerful, high-performance templating for the web and beyond
Poet - - Poet -- a modern Perl web framework for Mason developers
Poet::Manual::Tutorial -

< Prev  Next >
Last Updated on Monday, 21 April 2014 12:01