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

Accessing a matrix value from a dictionary of named coordinate tuples

by xyzzy (Pilgrim)
on Mar 11, 2014 at 21:36 UTC ( #1077910=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
       %h = (
          a => [3, 9, 4],
    ...
          c => [9, 7, 2],
          ...
       )
    
  2. or download this
        my ($x,$y,$z) = @{$h{$key}}; 
        $o->{m}[$x][$y][$z] = ...
    
  3. or download this
        sub matrixGet {
            my ($o, $x, $y, $z) = @_;
    ...
        ...
        $o->matrixGet(@{$h{$key}});
        $o->matrixSet(@{$h{$key}},5);
    
  4. or download this
        sub matrixGet {
            my ($m, $x, $y, $z) = @_;
    ...
        }
        ...
        matrixGet($o->{m},@{$h{$key}});
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1077910]
Approved by hippo
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2021-05-08 16:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (96 votes). Check out past polls.

    Notices?