Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Parsing data into an Array of Hashes

by thinker (Parson)
on Sep 18, 2003 at 13:06 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://292377]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-03-19 04:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found