Hi,
I use XML::Simple to parse XML file and use JSON module to parse JSON file. Now, I need to parse text file (see below). I wonder if there is any existing Module works for the text file below. I did google search, but, did not find proper one. Any ideas?
Below are three titles (books) I need to parse.
$VAR1 = '<HTML><BODY><PRE>
Title: Perl and Cgi for the World Wide Web 2ND Edition
Author: Castro, Elizabeth
ISBN: 0201735687
ISBN13: 9780201735680
Binding: TRADE PAPER
Class: USED
Section: Computer Languages-Perl
Price: 3.95
Location: 17
Item: 4
Condition: Standard
Availability: 1 to 3 days
Notes:
Pub Date: 20100429
Title: Perl and Cgi for the World Wide Web 2ND Edition
Author: Castro, Elizabeth
ISBN: 0201735687
ISBN13: 9780201735680
Binding: TRADE PAPER
Class: USED
Section: General-General
Price: 13.00
Location: 65
Item: 2
Condition: Standard
Availability: 1 to 3 days
Notes:
Free ship: no
Title: Perl and Cgi for the World Wide Web 2ND Edition
Author: Castro, Elizabeth
ISBN: 0201735687
ISBN13: 9780201735680
Binding: TRADE PAPER
Class: USED
Section: Computer Languages-Perl
Price: 8.95
Location: 1
Item: 7
Condition: Standard
Availability: 1 to 3 days
Notes:
Pub Date: 20100423
</PRE>';
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.