#!perl
my $x = 'outer';
{
my $x = $x; # new $x, copy value from old $x
print "$x\n";
$x = 'inner';
print "$x\n";
}
print "$x\n";
__END__
####
my %HoH;
%HoH = (
yadda1 => {
key1 => "value1",
key2 => &GetValue, # returns date string
key3 => &Compare($var1,$HoH{yadda1}{key2}),
},
yadda2 => {
key1 => "value1",
key2 => &GetValue, # returns date string
key3 => &Compare($var1,$HoH{yadda2}{key2}),
},
);
####
my %HoH = ( key1 => 'first' );
%HoH = (
key1 => 'second',
key2 => $HoH{key1},
);
####
my $date_string = &GetValue;
my $comparison = &Compare($var1, $date_string);
%HoH = (
yadda1 => {
key1 => "value1",
key2 => $date_string,
key3 => $comparison,
},
yadda2 => {
key1 => "value1",
key2 => $date_string
key3 => $comparison,
},
);