Help for this page

Select Code to Download


  1. or download this
    my %hash = ( network_type_1 => { conn_type_1 => [ 1 ],
                                     conn_type_2 => [ 2 ] },
    ...
                                     conn_type_2 => [ 4 ] } );
    # To get at the elements:
    print $hash{ $network }->{ $connection }->[ $pos ];
    
  2. or download this
    my %hash = ( 'network-type_1|conn_type_1' => [ 1 ],
                 'network-type_1|conn_type_2' => [ 2 ],
                 'network-type_2|conn_type_1' => [ 3 ],
                 'network-type_2|conn_type_2' => [ 4 ] ); 
    print $hash{ "$network|$conn" }->[ $pos ];