in reply to Too Many IDs
If your concern is memory, you can store just the "sn to id" map instead of storing all the data twice.
my %sn_to_id = map { $dat_by_id{$_}{sn} => $_ } keys %dat_by_id;
You then need to nest the references to get the value:
my $sn = 'b'; my $more = $dat_by_id{ $sn_to_id{$sn} }{more};
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Too Many IDs
by LanX (Saint) on Jan 09, 2020 at 11:30 UTC |