use Tie::IxHash;
use strict;
my $HoHoH = {};
tie %{$HoHoH->{$_}}, 'Tie::IxHash'
foreach qw(alice john andy);
# rest of code as above
# output:
alice
aaaa time = 20:00:00
www time = 22:00:00
bbb time = 25:00:00
andy
xxx time = 24:00:00
yyy time = 26:00:00
john
ccc time = 21:00:00
aaa time = 23:00:00
####
# global %HoHoH
tie %{$HoHoH{text}}, 'Tie::IxHash';
# lexical $HoHoH (reference)
my $HoHoH = {};
####
Global symbol "%HoHoH" requires explicit package name at /tmp/1.pl line 4.