Q&A

Q1: You've discussed efficiency a lot in this chapter, but as far as I can see, all my programs run in the blink of an eye. Is efficiency really worth worrying about?
A1: It depends. When you're using Perl to process example data, efficiency probably doesn't make a difference. When your Perl program has to process a 5 gigabyte Web log, it's worthwhile to cash in on any time savings that coding for efficiency can afford you. Perl is a language that's perfect for batch processing, and in the world of batch processing, every millisecond often counts.
Q2:I have a bit of code that uses a two-step process to extract something out of a string. The first pattern puts a substring into $1, and then the second pattern searches $1 for a different pattern. ...

Get Sams Teach Yourself Perl in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.