E
ela
For the following codes, the 2nd and 3rd lines print out a lot of IDs and
keys and the corresponding hash values. However, after executing the 4th
line, none is left for the 5th line to print. The 1st line should make
%absent contain more hash values than to delete by the 4th line. So I doubt
that I misunderstand something in usage, could anybody point the problem
out?
my %absent = map {$_ => 1} keys %Priseq;
foreach $key (keys %absent) {print $key, '=', $absent{$key}, "\n";
<STDIN>;}
foreach $key (@ids) {print $key, "\n"; <STDIN>;}
foreach $key (@ids) {delete $absent{$key};}
foreach $key (keys %absent) {print $key, '=', $absent{$key}, "\n";
<STDIN>;}
keys and the corresponding hash values. However, after executing the 4th
line, none is left for the 5th line to print. The 1st line should make
%absent contain more hash values than to delete by the 4th line. So I doubt
that I misunderstand something in usage, could anybody point the problem
out?
my %absent = map {$_ => 1} keys %Priseq;
foreach $key (keys %absent) {print $key, '=', $absent{$key}, "\n";
<STDIN>;}
foreach $key (@ids) {print $key, "\n"; <STDIN>;}
foreach $key (@ids) {delete $absent{$key};}
foreach $key (keys %absent) {print $key, '=', $absent{$key}, "\n";
<STDIN>;}