#!/usr/bin/perl -W use strict; use warnings; use Data::Dumper; my %hash; $hash{1}{2}{3} = '1/2/3'; $hash{1}{2} = '1/2'; print Dumper (\%hash);