Skip to Content
Perl and XML
book

Perl and XML

by Erik T. Ray, Jason McIntosh
April 2002
Intermediate to advanced content levelIntermediate to advanced
218 pages
6h 12m
English
O'Reilly Media, Inc.
Content preview from Perl and XML

Chapter 1. Perl and XML

Perl is a mature but eccentric programming language that is tailor-made for text manipulation. XML is a fiery young upstart of a text-based markup language used for web content, document processing, web services, or any situation in which you need to structure information flexibly. This book is the story of the first few years of their sometimes rocky (but ultimately happy) romance.

Why Use Perl with XML?

First and foremost, Perl is ideal for crunching text. It has filehandles, “here” docs, string manipulation, and regular expressions built into its syntax. Anyone who has ever written code to manipulate strings in a low-level language like C and then tried to do the same thing in Perl has no trouble telling you which environment is easier for text processing. XML is text at its core, so Perl is uniquely well suited to work with it.

Furthermore, starting with Version 5.6, Perl has been getting friendly with Unicode-flavored character encodings, especially UTF-8, which is important for XML processing. You’ll read more about character encoding in Chapter 3.

Second, the Comprehensive Perl Archive Network (CPAN) is a multimirrored heap of modules free for the taking. You could say that it takes a village to make a program; anyone who undertakes a programming project in Perl should check the public warehouse of packaged solutions and building blocks to save time and effort. Why write your own parser when CPAN has plenty of parsers to download, all tested and chock ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

XML and Perl

XML and Perl

Mark Riehl, Ilya Sterin
Pro Perl

Pro Perl

Peter Wainwright
Programming Web Services with Perl

Programming Web Services with Perl

Randy J. Ray, Pavel Kulchenko
Perl Template Toolkit

Perl Template Toolkit

Darren Chamberlain, Andy Wardley, David Cross

Publisher Resources

ISBN: 059600205XSupplemental ContentErrata Page