#!/usr/bin/perl use warnings; use strict; my %hash; my @array = (1..100); # this will be ok $hash{\@array} = 42; # but this will issue an error, because \@array # cannot be used as a key which varies $hash{\@array}{1} = 42; # this will be ok $hash{1}{\@array}{1} = 42; #this will be ok $hash{1}{\@array}{1}{1} = 42;