- or download this
foreach my $id (sort keys %test) {
delete $test{13};
}
print(scalar keys %test, "\n"); # 2
- or download this
@anon_list = sort keys %test;
foreach my $id (@anon_list) {
print "$id :: $test{$id}\n";
delete $test{13};
}
- or download this
foreach my $id (sort keys %test) {
next if not exist $test{$id};
print "$id :: $test{$id}\n";
delete $test{13};
}