Assignment, %hash = (); is quicker and neater. It may be neater yet to make the hash lexical and just let it go out of scope:
I generally use delete only when I know I want what remains of the hash later on.{ my %hash = ( foo => 'bar' ); # do stuff }
After Compline,
Zaxo
In reply to Re: Garbage Collection on Hash delete
by Zaxo
in thread Garbage Collection on Hash delete
by netoli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |