Posted by brian d foy on June 27, 2010
Perl’s flip-flop operator, .., (otherwise known as the range operator in scalar context) is a simple way to choose a window on some data. It 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 [...]
Posted by Josh McAdams on June 20, 2010
In Item 33: “Watch out for match variables, you found out that the match variable $`, $&, and $` come with a performance hit. With all of the module code that you might use, you might be using those variables even though you didn’t code with them yourself. There’s a module that can tell you [...]
Posted by brian d foy on June 16, 2010
I’ll be teaching an Effective Perl Programming course at YAPC::NA in Columbus, OH on June 24 and 25 at the conference venue. The cost of the two day master class is just $240, and this year that includes your snacks and lunches each day. Josh and I will also have a box of signed copies [...]
Posted by Josh McAdams on June 13, 2010
Even though Perl has support for low-level socket programming, that doesn’t mean that you have to program at the low-level. For common protocols such as FTP, HTTP, POP3, or SMTP, you can use modules that come with Perl to handle the transport details. libnet, the distribution that comprises the basic protocols, comes with Perl since [...]
Posted by Josh McAdams on June 6, 2010
Wouldn’t it be great if you could stop your program right before it died so you could see what’s causing the problem? You could start the Perl debugger and step your way to the problem, or set up some break points, but that’s often too much work. The Carp::REPL module let’s you drop into a [...]