Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Parsing data into an Array of Hashes

by thinker (Parson)
on Sep 18, 2003 at 13:06 UTC ( #292377=note: print w/replies, xml ) Need Help??


in reply to Parsing data into an Array of Hashes

Hi nimdokk

You could try something like

#!/usr/bin/perl use strict; use warnings FATAL => 'all'; use Data::Dumper; open DATA, "filename" or die $!; my @AoH; for (<DATA>){ my %hash; %hash = map { split '=' } split ','; push @AoH, \%hash; } print Dumper \@AoH;

cheers

thinker

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://292377]
help
Chatterbox?
and snow settles gently...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2017-06-24 22:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (562 votes). Check out past polls.