Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2018-02-23 01:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (300 votes). Check out past polls.

    Notices?