Demonstrating hash slices. : slice « Hash « Perl






Demonstrating hash slices.

   

%romanNumerals = ( one   => 'I',
                   two   => 'II',
                   three => 'III',
                   four  => 'IV',
                   five  => 'V',
                   six   => 'VI',
                   seven => 'VII',
                   eight => 'VIII',
                   nine  => 'IX',
                   ten   => 'X' );

print "The Roman numerals for three, five and eight are: ",
      "@romanNumerals{ 'three', 'five', 'eight' }\n";

   
    
    
  








Related examples in the same category

1.Hash Slices