Posted by brian d foy on April 27, 2010
Now that you should be able to get Effective Perl Programming, let us know if you find a problem. We’re going to keep a list of errata on this site. Make sure you check the current list before you spend your time reporting it to us. When you do find something, you can send it [...]
Posted by Josh McAdams on April 25, 2010
There is a lot going on when you use DBI to interact with a database. Tack on a few layers of abstraction from Object Relational Modelers (ORM’s) such as DBIx::Class and you can end up with a tricky maze of subroutine calls to dig through when you need to track down issues. DBI comes with [...]
Posted by brian d foy on April 25, 2010
Josh and I got hard copies of the Effective Perl Programming, Second Edition last week, and Amazon says they are in stock.
Posted by brian d foy on April 21, 2010
Here is the final table of contents for Effective Perl Programming, 2nd Edition. The “Item” references in our blog entries refer to the items in the book. We also have a map from the Item numbers in the first edition to those in the second, but we’ll have to do a little work to make [...]
Posted by Josh McAdams on April 18, 2010
Usually, you want to do as much of your work inside your Perl program as you can. CPAN has a wealth of modules that accomplish many tasks, including those that you normally do very easily from the command line. In the cases where you can’t find a module, you might not be able to improve [...]
Posted by brian d foy on April 15, 2010
As part of the promotional package for Effective Perl Programming, I wrote Process HTML with a Perl Module for InformIT. It’s just like the Items that you see here, but on another site.
Posted by brian d foy on April 14, 2010
Effective Perl Programming, Second Edition has already gone to the printers and we’re expecting to see the real thing in about a week. It still has to make it to the distributors and wholesalers though, and Amazon is still listing it as available on May 7.
Posted by brian d foy on April 11, 2010
Perl keeps track of the last position in a string where it had a successful global match (using the /g flag). You can access this position with the pos operator. With Perl 5.10, you can use the /p switch to get the per-match variable ${^MATCH} instead of the performance-dampening $&: use 5.010; my $string = [...]
Posted by brian d foy on April 4, 2010
The match and substitution operators, as well as regex quoting with qr//, use flags to signal certain behavior of the match or interpretation of the pattern. The flags that change the interpretation of the pattern are listed in the documentation for qr// in perlop (and maybe in other places in earlier versions of the documentation): [...]