in reply to Remove key/value pairs from a hash

Sorry, poor choice of words. The hash is written out to a file after the deletion of the records (key/value pairs). It has the same number of records (key/value pairs) after the deletion as it did before the deletion.

Thanks,
Mike

EDIT -

$before = keys %hash1; $after = keys %hash1;

Replies are listed 'Best First'.
Re^2: Remove key/value pairs from a hash
by ikegami (Patriarch) on Jun 11, 2005 at 06:27 UTC

    It still works... $before is 5, $after is 3

    The problem is obviously not with delete, but with your data. Why don't you dump the array, the before-hash and the after-hash using Data::Dumper as shown in my first post. That will show the problem with your real data.