in reply to Text File Parsing
Data Dumper to visualize your data structures, Tutorials->References-> particularly the topics on hashes of arrays (HoAs), The split function and Text::Table to format your textual data are some of the things you can look into to get this job done...
Excellence is an Endeavor of Persistence. A Year-Old Monk :D .
The general steps involved can be as follow:
- loop through your data file.
- split each line into a key and a value.
- push into the HoA the values referenced by the key.
- Loop through your HoA to print the lines or use Text::Table to align table columns neatly
Excellence is an Endeavor of Persistence. A Year-Old Monk :D .
|
---|
In Section
Seekers of Perl Wisdom