Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Saturday January 02, 2010
08:06 AM

I'm twittering my Perl stuff at

I'll tweet at ( when I have something to say in 140 characters. I'll almost always use "Perl" when I post.

Friday January 01, 2010
08:32 AM

Effective Perl Programming master class at Frozen Perl

At Frozen Perl 2010 in Minneapolis, I'm teaching a new master class based on my latest book, Effective Perl Programming, 2nd Edition. Perl has changed quite a bit since Joseph Hall wrote the first edition over 10 years ago. Josh McAdams and I have added a lot of new information as well as updated the existing material. In the one-day class for intermediate Perl programmers, I'll cover selected topics from the book, including:
  • Working with Unicode in Perl
  • Tricks with filehandles
  • New regex features in Perl 5.10 and later
  • Playing with pack()
  • Using closures to make things simpler
  • and other topics as time allows

Although the book hasn't been published yet, it is available for pre-order, and attendees to the class can get a sneak peek at the working manuscript as well as a soft copy of the course slides.

Thursday December 17, 2009
01:19 AM

What's your coolest Perl one-liner?

Josh and I are finishing up Effective Perl Programming, 2nd Edition, and the last part to finish off is the item on Perl one-liners.

Besides going through writing a one liner, we want to list a bunch of them too. Want to get your name in the book? Give us some one-liners that you wrote yourself and a couple of sentences about what it does. Make sure you tell us how you'd like your name to appear in the book, too. :)

Thursday October 22, 2009
03:13 PM

I'm in Dublin on Sunday

I kept meaning to post this, and I can't believe it's already this late in October.

Jonas Nielsen and I are going to be in Dublin, Ireland on Sunday because we're both running the marathon on Monday. If any local Perl Mongers want to get together for a drink on Sunday early evening, let me know. I'm staying about a mile from the marathon start and otherwise have no idea of the geography.

It might be my only time to see Jonas. Once he leaves the start line, I won't see him for hours. :)

09:07 AM

I'm a Perl::Critic committer.

Elliot forced me to accept a commit bit to the Perl Critic repo.

My first policy will be *::YouArentAllowedToProgramAnymore, which deletes your source if it finds that you fail any policy, you have any use of 'no critic', you run Perl::Critic more than once on the same file, or if it's Friday afternoon. If you have your stuff in source control, you should be safe. That's the fence you have to jump over to get back in, though.

Elliot already shot down my policy suggestions for *::NotEnoughVowels, *::PassiveVoiceInString, *::MisconjugatedVerb, *::StupidVariableName, *::UsesWindows, *:;DependsOnModules, *::YouEditedThisInEmacs, *::Magic8Ball, *::YourNameIsPudge, *::YourModuleWebsiteIsUgly, and *::YourPerlIsSoLastMonth.

Friday September 25, 2009
02:25 AM

I need some Unicode examples for Effective Perl Programming

Josh McAdams and I are updating Effective Perl Programming, and I'm working on a bunch of items dealing with Unicode.

I need some really nice non-english and especially non-romance language examples for some of the features we want to discuss. I'd love to be able to include sample strings in Chinese, Japanese, Russian, Portugeuse, Arabic, and all sorts of other languages I have no clue about. Most of what I need are the sample phrases. If you don't have something interesting, maybe you can translate "Perl mongers" for me in an example like:

use utf8;
my $phrase = '...'; # fill in your phrase
if( $phrase =~ m/\N{Some charname}/ ) {
     say 'I matched a ...';

I also want to add a couple of examples of other encodings, especially non-Western ones. I have no idea about those encodings, but I don't need anything fancy.

I'm sure that everything is going to get messed up and translated incorrectly, so I'll be sure to let you see the proofs of your example to ensure the typesetters get it right in the end. :)

Monday August 24, 2009
03:00 PM

$9.99 Learning Perl and Mastering Perl e-books from O'Reilly

O'Reilly dropped the regular price of e-books for Learning Perl and Mastering Perl to $9.99. I volunteered to be the guinea pig for pricing experiments. I specifically want to see if this makes it easier to get these books when access to the hard-copies is prohibitively expensive. You can get these books in Mobi, PDF, or ePub directly from O'Reilly. I'd like to do more of these sorts of experiments to get the books into as many hands as possible.

The $9.99 price is the regular price, so all existing discount and coupon codes apply. For instance, you can still use the 35% user group discount to get either book for $6.50.

These are the updated versions of the books too. All reported errata should be corrected, so they are slightly fresher than the hard copies.

Remember, the great thing about PDFs is that they don't take up any shelf space. Buy as many as you like!

Monday April 13, 2009
04:54 PM

backticks make my Windows testing service hang on ack

I've run into an interesting situation in testing CPAN modules on Windows using TeamCity. Testing from the command line, either cygwin or command, works fine, but when the automated tester has a go, it fails. I traced this back to modules that use system() or backticks. The ack distribution has been the one to demonstrate the problem first. I wonder if anyone else has seen a similar problem.

I've been working on a custom internal CPAN for a big company, and their CPAN is actually in subversion. When the subversion repo changes, lots of tests kick off, including tests for individual modules as well as integration tests. These tests run on both unix and Windows using the TeamCity build agents. Some of the Windows tests just hang forever, although they run fine on my workstation.

It appears that the Windows build agents are run as a Windows service, so it's not connected to something that can handle system calls. I don't understand the Windows set-up and architecture enough to say more than that. Once the build agent hits a line of code that wants to shell out somehow, it hangs forever. It only does this in the build agent.

I was working with ack, which has a t/ for things that most of the tests use. There is a run_ack_with_stderr() subroutine which uses backticks, and that's where the code hangs. Once it runs t/ack-1.t, everything stops.

Paul's IPC::System::Simple::capture() works as a backticks replacement and has already solved many problems we've had with Windows. However, my first try in replacing backticks made all sorts of other tests fail even though it could run the commands now. Nothing hung, but there was something I wasn't capturing correctly or putting in the right place, I figure. I eventually had to cut bait since I'm not getting paid to work on third-party modules.

I'm curious how this works for the Windows CPAN testers. Are you just running the testing script from a command or terminal window? Do you ignore distros that just hang? I didn't see any sort of ack failure that showed the same symptoms.

And, is there some sort of medal or award that Paul can get for IPC::System::Simple? I wasn't keen on depending on it at first, but now that I've experienced a bit of grief trying to make Windows be unix, I really appreciate IPC::System::Simple taking care of all of that.

Saturday April 04, 2009
06:57 PM

Get 15% off OSCON

Register for OSCON with the discount code os09pgm and get 15% off, courtesy of the Perl track committee.

Friday April 03, 2009
09:03 PM

I'm going to Moscow for YAPC::Russia

I get to go to YAPC::Russia because United Airlines has ridiculously cheap airfares to Moscow to celebrate their new direct service from Washington, DC. Even better than that, the frequent flier deals get me to Moscow for the price of a domestic ticket.. The conference is May 16-17, but I'll be there the week before too.

I just got my Lonely Planet Moscow City Guide, so now I have to start planning my trip.