#! /usr/bin/perl use feature ':5.10'; use strict; use warnings; #define a hash my %p = ("1","Rekjavik"); #check it's there (returns "Rekjavik") say $p{1}; #ask for input from user (user inputs the number 1) my $t = <>; #the hash has disappeared! (returns undef) say $p{$t};