A guide to getting the most out of Perl covers such topics as productivity hacks, user interaction, data munging, working with modules, object hacks, and debugging.
With more than a million dedicated programmers, Perl has proven to be the best computing language for the latest trends in computing and business. While other languages have stagnated, Perl remains fresh, thanks to its community-based development model, which encourages the sharing of information among users. This tradition of knowledge-sharing allows developers to find answers to almost any Perl question they can dream up. And you can find many of those answers right here in Perl Hacks. Like all books in O'Reilly's Hacks Series, Perl Hacks appeals to a variety of programmers, whether you're an experienced developer or a dabbler who simply enjoys exploring technology. Each hack is a short lesson--some are practical exercises that teach you essential skills, while others merely illustrate some of the fun things that Perl can do. Most hacks have two parts: a direct answer to the immediate problem you need to solve right now and a deeper, subtler technique that you can adapt to other situations. Learn how to add CPAN shortcuts to the Firefox web browser, read files backwards, write graphical games in Perl, and much more. For your convenience, Perl Hacks is divided by topic--not according toany sense of relative difficulty--so you can skip around and stop at any hack you like. Chapters include: Productivity Hacks User Interaction Data Munging Working with Modules Object Hacks Debugging Whether you're a newcomer or an expert, you'll find great value in Perl Hacks, the only Perl guide that offers somethinguseful and fun for everyone.
Among the many different approaches to "templating" with Perl--such as Embperl, Mason, HTML::Template, and hundreds of other lesser known systems--the Template Toolkit is widely recognized as one of the most versatile. Like other templating systems, the Template Toolkit allows programmers to embed Perl code and custom macros into HTML documents in order to create customized documents on the fly. But unlike the others, the Template Toolkit is as facile at producing HTML as it is at producing XML, PDF, or any other output format. And because it has its own simple templating language, templates can be written and edited by people who don't know Perl. In short, the Template Toolkit combines the best features of its competitors, with ease-of-use and flexibility, resulting in a technology that's fast, powerful and extensible, and ideally suited to the production and maintenance of web content and other dynamic document systems.In Perl Template Toolkit you'll find detailed coverage of this increasingly popular technology. Written by core members of the technology's development team, the book guides you through the entire process of installing, configuring, using, and extending the Template Toolkit. It begins with a fast-paced but thorough tutorial on building web content with the Template Toolkit, and then walks you through generating and using data files, particularly with XML. It also provides detailed information on the Template Toolkit's modules, libraries, and tools in addition to a complete reference manual.Topics in the book include: Getting started with the template toolkit The Template language Template directives Filters Plugins Extending the Template Toolkit Accessing databases XML Advanced static web page techniques Dynamic web content and web applications The only book to cover this important tool, Perl Template Toolkit is essential reading for any Perl programmer who wants to create dynamic web content that is remarkably easy to maintain. This book is your surefire guide to implementing this fast, flexible, and powerful templating system.
This book offers a collection of 256 guidelines on the art of coding to help you write better Perl code--in fact, the best Perl code you possibly can. The guidelines cover code layout, naming conventions, choice of data and control structures, program decomposition, interface design and implementation, modularity, object orientation, error handling, testing, and debugging. - Publisher
This book "takes you to the next level in Internet data retrieval by showing you how to create and deploy spiders and scrapers to retrieve and work with information from you favorite sites and data sources"--Back cover.
The author examines issues such as the rightness of web-based applications, the programming language renaissance, spam filtering, the Open Source Movement, Internet startups and more. He also tells important stories about the kinds of people behind technical innovations, revealing their character and their craft.
Since the dawn of creation, man has designed maps to help identify the space that we occupy. From Lewis and Clark's pencil-sketched maps of mountain trails to Jacques Cousteau's sophisticated charts of the ocean floor, creating maps of the utmost precision has been a constant pursuit. So why should things change now?Well, they shouldn't. The reality is that map creation, or "cartography," has only improved in its ease-of-use over time. In fact, with the recent explosion of inexpensive computing and the growing availability of public mapping data, mapmaking today extends all the way to the ordinary PC user.Mapping Hacks, the latest page-turner from O'Reilly Press, tackles this notion head on. It's a collection of one hundred simple--and mostly free--techniques available to developers and power users who want draw digital maps or otherwise visualize geographic data. Authors Schuyler Erle, Rich Gibson, and Jo Walsh do more than just illuminate the basic concepts of location and cartography, they walk you through the process one step at a time.Mapping Hacks shows you where to find the best sources of geographic data, and then how to integrate that data into your own map. But that's just an appetizer. This comprehensive resource also shows you how to interpret and manipulate unwieldy cartography data, as well as how to incorporate personal photo galleries into your maps. It even provides practical uses for GPS (Global Positioning System) devices--those touch-of-a-button street maps integrated into cars and mobile phones. Just imagine: If Captain Kidd had this technology, we'd all know where to find his buried treasure!With all of these industrial-strength tips and tools, Mapping Hacks effectively takes the sting out of the digital mapmaking and navigational process. Now you can create your own maps for business, pleasure, or entertainment--without ever having to sharpen a single pencil.
Part of the fun of programming in Perl lies in tackling tedious tasks with short, efficient, and reusable code. Often, the perfect tool is the one-liner, a small but powerful program that fits in one line of code and does one thing really well. In Perl One-Liners, author and impatient hacker Peteris Krumins takes you through more than 100 compelling one-liners that do all sorts of handy things, such as manipulate line spacing, tally column values in a table, and get a list of users on a system. This cookbook of useful, customizable, and fun scripts will even help hone your Perl coding skills, as Krumins dissects the code to give you a deeper understanding of the language. You'll find one-liners that: * Encode, decode, and convert strings * Generate random passwords * Calculate sums, factorials, and the mathematical constants π and e * Add or remove spaces * Number lines in a file * Print lines that match a specific pattern * Check to see if a number is prime with a regular expression * Convert IP address to decimal form * Replace one string with another And many more! Save time and sharpen your coding skills as you learn to conquer those pesky tasks in a few precisely placed keystrokes with Perl One-Liners.
Covers advanced features of Perl, how the Perl interpreter works, and presents areas of modern computing technology such as networking, user interfaces, persistence, and code generation.
There is an increasing need for more advanced information about how to write the most effective Perl scripts. This book shows in sixty concise and direct lessons how to tackle and solve common programming obstacles. Effective Perl Programming explains idiomatic Perl, covering the latest release (Version 5), and includes information and useful examples about the structure, functions, and latest capabilities of the language, such as self-documenting object-oriented modules. You can also learn from Hall's answers to real life questions and problems he receives from newsgroups and his Perl seminars.