Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 0.33 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. hash holding the values of address of a 2 D array
  2. my %hash = (
  3.     foo => [[1, 2], [3, 4]],
  4.     bar => [[5, 6], [7, 8]]
  5. );
  6.        
  7. $array_element_1 = ['row 1 column 1', 'row 1 column 2'];
  8. $array_element_2 = ['row 2 column 1', 'row 2 column 2'];
  9. $array_reference = [$array_element_1, $array_element_2];
  10. %hash = ( 'key' => $array_reference);