programming-examples/perl/Hash/Demonstrating hash slices.pl

13 lines
469 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
%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";