This Item isn’t really about random hex digits, but we thought we’d expand on an Item in the original Effective Perl blog that Joseph set up to support the first edition of Effective Perl Programming. He had an Item titled “Creating a String of Random Hex Digits”. We won’t reproduce it here, so you should read his version too. Continue reading “Create random strings”
The Effective Perler in 2010
The second edition of Effective Perl Programming came out toward the middle of the year, but we started this blog much sooner. We had mostly finished the principal writing and were in the editing process so we had some extra time to cover some of the extra material that didn’t make it into the book. Continue reading “The Effective Perler in 2010”
Use a smart match to match several patterns at once
The smart match operator (Item 23. Make work easier with smart matching) reduces many common comparisons to a few keystrokes, keeping with Perl’s goal of making the common things easy. You can use the smart match operator to make even less common tasks, such as matching many regular expressions at the same time, just as easy. This Item shows you how to use the smart match to see if at least one of a series of regexes matches a string. Continue reading “Use a smart match to match several patterns at once”
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”
Effective Perl Programming at Frozen Perl 2011
On Friday, February 4, 2011 at Frozen Perl, I’m teaching a master class based on Effective Perl Programming, 2nd Edition. The master class is a low-cost, condensed class format given at a public Perl event. The cost of this one-day class is $100, and there are a limited number of $25 seats for full-time students.
In the one-day class for intermediate Perl programmers, I’ll cover selected topics from the book and possibly from this website.
Find a module’s release managers
The CPAN ecosystem is more than just a way to share your code with other people. It’s also a way to let other people collaborate on the code and to help you release it. In Item 70. Contribute to CPAN, you saw how to upload your work to the Perl Authors Upload Server (PAUSE). There’s a lot more that you can do through PAUSE, though. Even if you aren’t a CPAN author, you can use PAUSE to find out more about a module’s authors and comaintainers. Continue reading “Find a module’s release managers”
Count the number of times a character occurs in a string
This Item isn’t really about counting characters in a string, but we thought we’d expand on an Item in the original Effective Perl blog that Joseph set up to support the first edition of Effective Perl Programming. He had an Item titled “Counting the Number of Times a Character Occurs in a String”. We won’t reproduce it here, so you should read his version too. Continue reading “Count the number of times a character occurs in a string”
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”
Make your methods know as little as possible
How often have you wished that one of Perl’s modules did things slightly differently? That module mostly works for you except for some hard-coded decisions in string formats, pack specifications, or other minor point that you wish that you could configure. Continue reading “Make your methods know as little as possible”
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)”