Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: 3d arrays

by deibyz (Hermit)
on Apr 07, 2005 at 16:50 UTC ( [id://445779]=note: print w/replies, xml ) Need Help??


in reply to Re: 3d arrays
in thread 3d arrays

If you need real coordinates, an Array wouldn't be enough. You can switch to a HoH (Hash of hashes), something in the lines of:

my $HoH = { 101.67 => { 80 => 5 } , 312 => { 67.8 => 7 } };

Then you can retrieve the values with $HoH->{312}{67.8}.

Just be aware that hash keys are strings, so use sprintf if you get them from variables, or you're going to get strange results.

Log In?
Username:
Password:

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

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

    No recent polls found