in reply to Can not print hash element

use Data::Dumper module for debugging these kind of issues. The following is the output of '%table' hash using Data::Dumper before removing the space from your input. You can find spaces in front of all the country names.
use Data::Dumper; print Dumper(%table);
output
$VAR1 = ' Germany'; $VAR2 = [ 'Frankfurt', 'Berlin' ]; $VAR3 = ' Finland'; $VAR4 = [ 'Helsinki' ]; $VAR5 = ' USA'; $VAR6 = [ 'Chicago', 'Washington', 'New York' ];