[Ma-linux] perl hash construction
John Anderson
genehack at genehack.org
Wed May 5 07:19:37 EDT 2010
On May 4, 2010, at 1:53 PM, Przemek Klosowski wrote:
> this has got to be a common Perl use case, but I can't think of a
> compact, Perlish way of writing it. I am reading tabular data into a
> Perl hash---I want to refer to the data by the field names:
While we're bikeshedding your original very simple request -- and yeah, +1 hash slices -- depending on what you're gonna do with this data once you've read it in, you may want to look at something like DBD::RAM[1], which will build a in-memory representation that you can query with SQL syntax via the DBI module.
[1]: http://search.cpan.org/~jzucker/DBD-RAM/RAM.pm
j.
More information about the Ma-linux
mailing list