Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: structuring data: aka walk first, grok later

by runrig (Abbot)
on May 30, 2008 at 16:48 UTC ( #689273=note: print w/replies, xml ) Need Help??


in reply to Re: structuring data: aka walk first, grok later
in thread structuring data: aka walk first, grok later

I'd probably just make the coordinates into an array (and maybe define constants):
use constant { X => 0, Y => 1, }; my %DATA; while (<>) { my ($obs, $det, $x, $y) = split ' '; push(@{$DATA{$obs}{$det}}, [ $x, $y ]); } print "$DATA{21}{'DET-2'}[0][X]\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://689273]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2018-05-25 08:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?