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”

Use the return value from srand

[This is another bonus, mid-week item since it’s so short and probably mostly useless as a tweak to what you already do.]

Perl 5.14 changes srand to return the seed that it used to start the pseudorandom number generator that gives you numbers through rand. There are plenty of interwebs that will explain the difference between real randomness and the sort that you get from computers, but for this item, suffice it to say that the numbers you get from perl are completely deterministic. If you start with the same seed, you get the same sequence. Continue reading “Use the return value from srand”

Set default values with the defined-or operator.

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

Prior to Perl 5.10, you had to be a bit careful checking a Perl variable before you set a default value. An uninitialized value and a defined but false value both acted the same in the logical || short-circuit operator. The Perl idiom to set a default value looks like this: Continue reading “Set default values with the defined-or operator.”

Do you want extra Effective Perl in Safari Books?

We’re looking for some reader feedback. You can comment here, send us mail, reply on Twitter, skywrite your message in Chicago (please send us a link to that video in case we miss it), or come up to us at a conference.

We’re thinking about writing an extra, bonus chapter of Effective Perl Programming for Safari Books Online. We’re having fun providing lots of free, extra content on this website, but we thought we might do something nice for those you also paid to get online access to our book. Continue reading “Do you want extra Effective Perl in Safari Books?”

Effective Perl Programming is in PDF and ePub

I just found out that Effective Perl Programming is available in digital formats through eBooks.com. They have a PDF version and an ePub version, each for $US31.99, which, sadly, is more than the hard-copy price of $US26.39 on Amazon.com and the Kindle price of $US17.59. Continue reading “Effective Perl Programming is in PDF and ePub”

A Chinese translation of Effective Perl Programming is in the works

There’s a Chinese translation of _Effective Perl Programming_ in the works. I don’t know when it will be available: the translation will take some time, then the publisher has to put it on paper, then it has to show up in stores. I don’t have any details on where or how you can buy the translation. If you know those, please let us know and we’ll post the details here (even using your referral link).

However, if you’re reading this directly, the Chinese edition might not matter to you. :)

If you know about any other translations, tell us about those too. Often the author doesn’t find out about them until they get a copy, if they ever get a copy.

Effective Perl free sample chapter: Files and Filehandles

Addison-Wesley converted our chapter on “Files and Filehandles” to HTML and put it online for as a free sample chapter. I selected this chapter as the free sample because it was the most fun to write but also the most valuable to new Perl programmers. Filehandles are the way you interact with the world, and using them wisely can give your program quite a bit of flexibility and make many tasks much easier.

Here’s the list of Items from that chapter, each of which you can read for free online:

We’ve also added more Items for “Files and Filehandles” in this blog, which you can also read for free. However, don’t forget about that Donate button on the right had side of the page if you find this site valuable. Or, buy our book and encourage all your friends to buy our book. Donations and book sales give us a little motivational boost to keep going. :)