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
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?
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 examining the Monastery: (9)
As of 2015-07-08 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (98 votes), past polls