Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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


Comment on Re: Cool way to parse Space Separated Value and CSV files
Download Code
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027911]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-08-23 19:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (178 votes), past polls