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 ]

petdance (2468)

AOL IM: petdance (Add Buddy, Send Message)
Yahoo! ID: petdance (Add User, Send Message)

I'm Andy Lester, and I like to test stuff. I also write for the Perl Journal, and do tech edits on books. Sometimes I write code, too.

Journal of petdance (2468)

Wednesday January 31, 2007
12:08 AM

February Chicago.PM: It's a dynamic language hootenanny

Chris McAvoy will be rounding up the big four dynamic languages in a rootin'-tootin' look at what's what in the world of Perl, PHP, Python and Ruby. Is PHP just for script-slinging marketdroids? Do Python's whitespace rules really suck as much as you'd think? Is Ruby more than Rails? What can we learn from them for Perl?

Chris promises to make this a no-BS, no-bashing, honest look at the strengths and weaknesses of each of these languages. Come with an open mind and we'll explore the limitless frontiers of awesome programming.

Chris will be presenting both in the city and the suburbs this month:

Come on out and learn some new tricks!

Wednesday December 06, 2006
03:56 PM

I'm so proud

I'm so proud. Two of my modules are in the 2006 Perl Advent Calendar: ack Module::Starter

Tuesday December 05, 2006
10:05 PM

Socialtext hackathon 12/6/2006

Wednesday, December 6th is Wiki Hackathon day, at the home office of my employer, Socialtext.

Join us from remote or in our offices in Palo Alto to hack your Wiki project to your heart's content. We'll showcase all projects on this site and elsewhere, provide beer and pizza, and might even have some nifty giveaways for the day's coolest hacks. Virtual participants can join us in IRC channel #socialtext on Visit the wikithon workspace at

Wednesday November 29, 2006
11:53 PM

Top 10 reasons to use ack

Yesterday I posted about a snazzy trick with ack, but people pinged me asking what ack is and why they should use it.

ack is the replacement I wrote for grep, aimed at large trees of heterogeneous code.

Using it will change your life, but why? Here's my top 10 list:

  1. Searches recursively through directories by default, while ignoring .svn, CVS and other VCS directories.
    • Which would you rather type?
      $ grep pattern $(find . | grep -v .svn)
      $ ack pattern
  2. ack ignores most of the crap you don't want to search
    • VCS directories
    • blib, the Perl build directory
    • backup files like foo~
    • binary files
  3. Lets you specify file types to search, as in --perl or --nohtml.
    • Which would you rather type?
      $ grep pattern $(find . -name '*.pl' -or -name '*.pm' -or -name '*.pod' | grep -v .svn)
      $ ack --perl pattern

    Note that ack's --perl also checks the shebang lines of files without suffixes, which the find command will not.

  4. File-filtering capabilities usable without searching with ack -f. Want a list of all Perl files in a tree? Use ack -f --perl.
  5. Color highlighting of search results.
  6. Uses real Perl regular expressions, not a GNU subset.
  7. Allows you to specify output using Perl's special variables
    • Example: ack '(Mr|Mr?s). (Smith|Jones)' --output='$&'
  8. Many command-line switches are the same as in GNU grep:
    -w does word-only searching
    -c shows counts per file of matches
    -l gives the filename instead of matching lines
  9. ack is pure Perl, so consistent across all platforms.
  10. Command name is 25% shorter. :-) Heck, it's 50% shorter compared to grep -r.

To install it, install the Perl module App::Ack. Your coding life will never be the same.

Visit the home page at

02:37 PM

Today's handy ack trick

andy@mel[~/src/st/trunk]$ ack -w 'XXX|REVIEW|FIXME' -o | sort | uniq -c
  37 FIXME
674 XXX

What, you don't know what ack is? Get to and install it now. Even better, just do this:

sudo cpan App::Ack

Tuesday November 21, 2006
06:23 PM

New Text::Balanced removes $&

Over in the land of Socialtext Open, we found that we were having big slowdowns because of $& somewhere in the code base. Turns out it was in Text::Balanced. I fired off mail to Damian and within half an hour he'd put out a new version that didn't use the evil variable.

If you don't know why $& is bad, see the docs for Devel::SawAmpersand.

Sunday November 19, 2006
12:43 PM

Anti-Perl FUD

James Keenan has posted an interesting question on his journal about dealing with the Anti-Perl people out there.
Friday October 20, 2006
02:21 PM

Krugle at the Chicago Hackathon

The Chicago Hackathon ( is excited to have Krugle part of the proceedings. Krugle ( is a search engine for source code, projects, and technical information across the web, and they want your feedback. The Krugle team wants to hear from Perl programmers about how Krugle can be more useful to the Perl community.

On Saturday, Krugle will be hosting a demo of Krugle, as well as feeding us pizza. They're looking for content advisors, feature feedback, and other interesting ideas. If you're interested, plan on stopping in the main meeting room. If you're not, just come by, grab some pizza, and head back to hacking.

Ken Krugler, the founder, will be hosting the demo and conversation. He first cut his coding teeth in the Lisa/Mac vortex, and then spent 15 years solving I18N problems. For the past 18 months he's been obsessing about exploratory vertical search for code. In his spare time, he fiddles with cellular automata.

Monday September 18, 2006
05:22 PM

WWW::Mechanize tries to support REST

I've had to do some REST work and I was shocked to see that LWP::UserAgent doesn't have a put() method for doing PUT calls.

Until Gisle puts it in there for us, I've added one to WWW::Mechanize 1.21_01, which I just put up on CPAN.

10:17 AM

HTML::Tidy overhaul work is commencing

Jonathan Rockway, Robert Bachmann and I are starting work in earnest on making HTML::Tidy better, mostly setting up access to much of the tidy API. is the project home page. We have a mailing list set up there, and the Subversion repository is hosted at Google as well.