Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Cool way to parse Space Separated Value and CSV files

by Anonymous Monk
on Apr 10, 2013 at 07:18 UTC ( #1027911=note: print w/replies, xml ) Need Help??

in reply to Cool way to parse Space Separated Value and CSV files

Hashes are dictionaries ... $age{Peter} is pronounced age-of-Peter
$price{hammer} price-of-hammer
$definition{dictionary} definition-of-dictionary ... more on this type of thing in Re^3: highest value in hash (virtual teddybear)

Speaking of csv and dictionary-of-@fields :) you could even use the technique with fixed with records :)

Examples at

 [CSV hash ] CSV hash
Best way to match a hash with large CSV file
perl hash to CSV using Text::CSV_XS
Issue parsing CSV into hashes?
Veriable Length Array/Hash derived from CSV to populate an XML
extracting data from CSV files and making hash of hashes
Re^2: build hash from csv file
Encoding a hash in perl before saving it as a CSV file
hash from CSV-like structure
Read the csv file to a hash....
Parsing CSV into a hash
build hash from csv file
Converting a CSV list to a list of hashrefs naming the fields

merging csv files into a third file preserving column & row

Replies are listed 'Best First'.
Re^2: Cool way to parse Space Separated Value and CSV files
by greengaroo (Hermit) on Apr 10, 2013 at 13:12 UTC

    Hashes are dictionaries

    That is a dam good explanation! I will use it in my class! Never thought of it! Thank you very much!

    A for will get you from A to Z; a while will get you everywhere.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027911]
and monks are getting baked in the sun...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2018-05-21 17:23 GMT
Find Nodes?
    Voting Booth?