# File: hash0.pl # Title: The hash data structure: %myhash # Author: Mihaela Malita # C:\myPerl>perl hash0.pl # dictionary is: cinquefivetroisthreeunonequatrefourdeuxtwo # Keys are: cinque trois un quatre deux # Values are: five three one four two %Dictionary = (un => one, deux => two, trois => three, quatre => four, cinque => five); print "dictionary is: ", %Dictionary; @Mykeys = keys %Dictionary; # the keys of the dictionary print "\nKeys are: @Mykeys"; @Myvalues = values %Dictionary; # values for keys print "\nValues are: @Myvalues"; $Dictionary{'six'} = 'six'; # add/change key-value. Use curly brackets {} print "\nNew dictionary is: ", %Dictionary; #are NOT printed in order exit;