Effective Perler discounts during OSCON

I’ll be at OSCON on Tuesday, July 17, but you don’t have to find me to get up to 37% off Effective Perl Programming. That’s a slightly lower price than Amazon. To get that discount, you have to buy the book at Pearson’s booth in the exhibition hall. You’ll need to track me down on Tuesday afternoon or evening if you want me to sign your book.

If you can’t make it to OSCON, you can still get 35% off the cover price by ordering directly from the InformIT discount link or using the OSCON2012 discount code when you check out. Instead of navigating their site, you can go directly to our book.

If you’re not sure you want the book, you can look at a free sample chapter, which is also 35% off during OSCON.

A Chinese translation of Effective Perl Programming

I mentioned a long time ago that a Chinese translation of Effective Perl Programming was in the works, and apparently it’s done. Someone sent me a copy of the Chinese version of the book. I can’t tell you who did it (if it’s you, let me know) and I don’t know where you can buy it (if you know, let me know). Also, I don’t know what I want to do with the copy that I have. I don’t read Chinese, so I can’t really read the book to see how well it translates, and I don’t want to keep the book as a trophy. Does someone else want the book? Is there a Chinese Perl event that would like to give it away as a prize? I’ll get Josh and I to sign it and send it along.

2021 Update A reader wrote to me to note that the name of the book is “Perl高效编程” from Pearson Education, Inc. and Post&Telecom Press publishing as Addison Wesley. It’s on TaoBao from various sellers.

Some special Unicode shell aliases to normalize strings

If you are playing with Unicode, you’re probably going to want to convert to the various normalization forms. There are some programs to do this in the Unicode::Tussle distribution, but you can also create some one-liners to do this as well (Item 120. Use Perl one-liners to create mini programs). Continue reading “Some special Unicode shell aliases to normalize strings”

Find dates with Regexp::Common

[This is a mid-week bonus item]

Suppose you want to find some dates inside a big string. The problem with dates is that there are some many ways to write them, and even if you can come up with a pattern to get the structure right, can you handle the different locales and languages that use different words to refer to the same day or month? Continue reading “Find dates with Regexp::Common”

Use Regexp::Common to find locale-specific dates

[This is a mid-week bonus item, and it’s a bit of a departure from much of what you have already seen on this blog. This is just some code that I had to write this week and I thought you’d like to see it.]

I had to find some dates inside a big string, and the problem with dates is that there are some many ways to write them, and even if I get the format right, some of the machines might use another locale. My string comes from an ls I run as a remote command, which might show the date in one of two formats. The files changed in the last six months replaces the year with the time: Continue reading “Use Regexp::Common to find locale-specific dates”

Perl 5.14 adds non-destructive transliteration

[This is a mid-week bonus item since it’s so short]

In Perl 5.13.2, you got a non-destructive version of the substitution operator (Use the /r substitution flag to work on a copy). Instead of changing it’s target, the non-destructive version returns a new string that has the substitution. Continue reading “Perl 5.14 adds non-destructive transliteration”

Force install a module to reinstall it

[This is a midweek bonus Item since it is so short]

I recently bought the new MacBook Air, which means my solid state device has over four times the storage as my old MacBook Air. For the first time, I used Apple’s migration tool to transfer everything from the old one to the new one. It even transferred my perl installations, and I thought that would be fine. It mostly is, except for some compiled modules that cause strange, new errors. Programs don’t load correctly, modules don’t compile, and things go horribly wrong when running test suites. Continue reading “Force install a module to reinstall it”

Try the Safari Books iPad application (well, not yet)

After I started writing this, which I’ve been working on off and on this month, the Safari To Go app disappeared from the US iTunes Store. I’ll update this review when the re-release fixes the issues involved. Some of the speed issues might be related to its apparent pre-release status. The Safari Books team alludes to this in a blog post. Until then, you can use the mobile interface to the main Safari web site.

Safari Books Online now has an free iPad app that allows you to read Effective Perl Programming quite nicely on your iPad. The output looks much nicer than the Kindle or iBooks versions, although the interface is not as nice as reading a bookmarked PDF file in a general PDF reader. The app isn’t mobile interface to the main Safari web site, but it’s not much more than that. Most of the features seem to be an interface to the main site though. Continue reading “Try the Safari Books iPad application (well, not yet)”