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)”

Make exclusive flip-flop operators

In Respect the global state of the flip flop operator, you saw some examples of the .. scalar operator. The flip-flop operator returns false until its lefthand side is true. Once the lefthand side is true, the flip-flop operator returns true until its righthand side is true. Once the righthand side is true, the flip flop operator returns false: Continue reading “Make exclusive flip-flop operators”

Use CORE when you need the real thing

Perl’s a dynamic language, which means you get to change the definition of almost anything while the programming is running. You can even change the defintions of Perl’s built-in subroutine. Once you (or the evil doer who wrote the module you need) change the definition, you might want to get back to the original, and Perl provides a way for you to do that. Continue reading “Use CORE when you need the real thing”

Read Effective Perl Programming on the Safari Books Online mobile site

You can read Effective Perl Programming in the Safari Books Online mobile site, and it looks pretty nice. One of the advantages of Safari Books Online is that you don’t have to buy individual books. You have access to all of the books for a subscription fee. It’s even better if you get your company to buy an enterprise subscription for you and everyone you work with. Continue reading “Read Effective Perl Programming on the Safari Books Online mobile site”

Avoid modifying scalars connected to string filehandles

Since Perl 5.8, you can treat a string as a file (Item 54. Open filehandles to and from strings). You can open a filehandle, read from the string, write to the string, and most of the other things that you can do with a file. There are some gotchas though, when you deal with that string as a normal string and a filehandle at the same time. We’ve filed this as RT 78980: Odd behavior when string filehandles and scalar assignment collide. Continue reading “Avoid modifying scalars connected to string filehandles”

Use array references with the array operators

[Update: Perl v5.24 removes this experimental feature]

There’s a significant change in syntax showing up in Perl 5.14. The array operators push, pop, shift, and unshift previously only worked on named arrays or dereferenced references. Now, thanks to David Golden, they’ll work on array references. Not only that, they’ll work on references that you’ve stored in variables or that come as the return values from subroutine calls. This feature will show up in Perl 5.13.7, so you need to compile a development version to try this: Continue reading “Use array references with the array operators”

Effective Perl giveaways at conferences

We’re offering a hardcopy of Effective Perl Programming as a giveaway, in any manner that the organizers decide, for two upcoming conferences:

If you would like to offer a copy of Effective Perl Programming at a prize at your conference, please let us know. We’ll figure out how to get them to you.