#!/usr/bin/perl5 -w ########################################################## %fred = (1 => "un", 2 => "deux", 3 => "trois"); %mary = (1 => "eins", 2 => "zwei", 3 => "drei"); print "\nfred:"; for (keys %fred) {printf "\t%3s: %-8s", $_, $fred{$_}}; print "\nmary:"; for (keys %mary) {printf "\t%3s: %-8s", $_, $mary{$_}}; print "\n"; @nm = qw(fred mary); for $n (@nm) {print "\n$n:"; for (keys %{$n}){printf "\t%3s: %-8s", $_, ${$n}{$_}}} my %fred1 = (1 => "yksi", 2 => "kaksi", 3 => "kolme"); my %mary1 = (1 => "uno", 2 => "due", 3 => "tre"); use strict; my @nm1 = qw(fred1 mary1); print "\n"; for my $n (@nm1) { print "\n$n:"; for my $m (keys %{$n}) { printf "\t%3s: %-8s", $m, ${$n}{$m}; } } print "\n"; __END__ (svmoloch:szhxrv) $ ./test_hashname.pl fred: 1: un 2: deux 3: trois mary: 1: eins 2: zwei 3: drei fred: 1: un 2: deux 3: trois mary: 1: eins 2: zwei 3: drei Can't use string ("fred1") as a HASH ref while "strict refs" in use at ./test_hashname.pl line 27. fred1: