#!/usr/bin/perl -w use strict; use diagnostics; my %hash; $hash{1}{"ONE"}="testdir"; $hash{1}{"TWO"}="tmpdir"; $hash{2}{"LOCATIONA"} = $hash{1}{"ONE"}."/".$hash{1}{"TWO"}."/my_file.txt"; $hash{2}{"LOCATIONB"} = $hash{1}{"TWO"}."/".$hash{1}{"ONE"}."/my_file.txt"; print "$hash{2}{LOCATIONA} = location a\n"; print "$hash{2}{LOCATIONB} = location b\n";