Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Data Structures

by Anonymous Monk
on May 04, 2008 at 17:41 UTC ( [id://684452]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Data Structures
in thread Data Structures

Given your example, what you want is a hash of arrays of hashes:
my %data; push @{$data{$linename}}, { station => $station, coords => $coords, ea +sting => $easting, northing => $northing, elevation => $elevation };
for my $linename ( keys %data ){ for my $entry ( @{$data{$linename}} ){ print "$linename: @{$entry}{qw(station easting northing elevation) +}; } }
At least, that's what it looks like from your example, but you really haven't given enough information about the structure of those fields.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://684452]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-20 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found