in reply to Re: Variable scoping when a sub calls itself??
in thread Variable scoping when a sub calls itself??
cosmicperl wants to delete pairs from hashes where the values are empty hash or array refs. After your sub runs, $hashvar looks like this:
$hashvar = { 'hemp' => undef, 'emp' => undef };
No need for recursion to achieve that, perl's garbage collector does the rest when you just delete the hash values ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Variable scoping when a sub calls itself??
by GrandFather (Saint) on Apr 15, 2008 at 22:47 UTC |