Skip to Content
XML and Perl
book

XML and Perl

by Mark Riehl, Ilya Sterin
October 2002
Intermediate to advanced content levelIntermediate to advanced
400 pages
9h 40m
English
Sams
Content preview from XML and Perl

Exercise

  1. Generate an XML file using a Perl data structure using the Perl print function and then again using the Perl XML::Writer module. The data structure consists of an array of hashes that holds email list information. Here is a sample data structure to use as input. Of course, you can change the data if you feel more comfortable using your personal information.

    my @list = ({ 
                   first => 'Ilya', 
                   last => 'Sterin', 
                   email => 'isterin@cpan.org' 
                }, 
                { 
                   first => 'Mark', 
                   last => 'Riehl', 
                   email => 'mark_riehl@hotmail.com' 
                }); 

The reason for using the data structure for an input data source is that it simulates XML generation as one part of a multistep process. For example, the XML document may get generated as a result of previous processing by the ...

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

Perl and XML

Perl and XML

Erik T. Ray, Jason McIntosh
Programming Web Services with Perl

Programming Web Services with Perl

Randy J. Ray, Pavel Kulchenko
Mastering Perl

Mastering Perl

brian d foy
Perl by Example

Perl by Example

Ellie Quigley

Publisher Resources

ISBN: 0735712891Purchase book